Skip to content

Instantly share code, notes, and snippets.

@cici004
cici004 / gist:8f3de90be67b741fa741
Created March 16, 2016 22:02
Search Widget-HTML
<div class="cmvSearchwidget">
<div class="pmNode">
<button data-dojo-type="dijit.form.Button" data-dojo-attach-point="myButton" data-dojo-attach-event="onClick:showTabcontainer">
Search for EA/SR
</button>
<div data-dojo-type="dijit.layout.TabContainer" data-dojo-attach-point="tabContainer" tabStrip="true">
<div id="tabByAttribute" data-dojo-attach-point="tabByAttribute" data-dojo-type="dijit/layout/ContentPane" title="${i18n.Labels.tabTitleByAttribute}" class="searchTab" selected="true">
<div class="selectALayer">
<label>${i18n.Labels.selectALayer}:</label><br>
<select style="width:100%;" data-dojo-attach-point="selectLayerByAttribute" data-dojo-type="dijit/form/Select" data-dojo-attach-event="onChange:onAttributeLayerChange"></select>
@cici004
cici004 / gist:25dd081230c1645c0098
Created March 16, 2016 22:04
Search Widget - Javascript
/*eslint strict: 0 */
define([
'dojo/_base/declare',
'dijit/_WidgetBase',
'dijit/_TemplatedMixin',
'dijit/_WidgetsInTemplateMixin',
'dojo/_base/lang',
'dojo/on',
'dojo/dom-style',
<div = "cmvSearchWidget">
<div data-dojo-type="dijit/layout/TabContainer" data-dojo-props="region:'center'" tabStrip="true" data-dojo-attach-point="tabContainer" class="tabContainer">
<div id="tabByAttribute" data-dojo-attach-point="tabByAttribute" data-dojo-type="dijit/layout/ContentPane" title="${i18n.Labels.tabTitleByAttribute}" class="searchTab" selected="true">
<div class="selectALayer">
<label>${i18n.Labels.selectALayer}:</label><br>
<select style="width:100%;" data-dojo-attach-point="selectLayerByAttribute" data-dojo-type="dijit/form/Select" data-dojo-attach-event="onChange:onAttributeLayerChange"></select>
</div>
<div data-dojo-attach-point="divAttributeQuerySelect" id="divAttributeQuerySelect" class="searchSelector">
<label>${i18n.Labels.selectAQuery}:</label><br>
<select style="width:100%;" data-dojo-attach-point="selectAttributeQuery" data-dojo-type="dijit/form/Select" data-dojo-props="disabled:true" data-dojo-attach-event="onChange:onAttributeQueryChan
/*eslint no-alert: 0*/
define([
'dojo/on',
'dojo/_base/lang',
'dojo/date/locale'
], function (on, lang, locale) {
'use strict';
function formatDateTime (value) {
if (value instanceof Date) {
/*eslint strict: 0 */
define([
'dojo/_base/declare',
'dijit/_WidgetBase',
'dijit/_TemplatedMixin',
'dijit/_WidgetsInTemplateMixin',
'dojo/_base/lang',
'dojo/on',
'dojo/dom-style',
{
name: 'Search by SR',
expression: '', // additional where expression applied to all queries
idProperty: 'objectid_1',
queryParameters: {
type: 'spatial', // spatial, relationship, table or database
url: 'http://sv04gis:6080/arcgis/rest/services/Surveys/ControlPoints/MapServer/0'
outFields :['*']
},
attributeSearches: [
doDownload : function() {
//TEST BEGIN to
var urls = [];
var rc = this.getRowsAndColumns();
console.dir(rc)
for (var i=0, il = rc.rows.length; i<il;i++){
/*
---
script: Fx.Accordion.js
description: An Fx.Elements extension which allows you to easily create accordion type controls.
license: MIT-style license
authors:
- Eva Lösch
- Valerio Proietti
requires:
- core:1.2.4/Element.Event
/*
---
script: Fx.Accordion.js
description: An Fx.Elements extension which allows you to easily create accordion type controls.
license: MIT-style license
authors:
- Eva Lösch
- Valerio Proietti
requires:
- core:1.2.4/Element.Event
/*
---
script: Fx.Accordion.js
description: An Fx.Elements extension which allows you to easily create accordion type controls.
license: MIT-style license
authors:
- Eva Lösch
- Valerio Proietti
requires:
- core:1.2.4/Element.Event