dojo

applying css to dijit button

守給你的承諾、 提交于 2019-12-05 06:46:36
I have the following HTML and CSS: <button id="myBtn" dojoType="dijit.form.Button">Testing</button> #myBtn { margin-left: 100px; } The CSS is supposed to push the button in 100px . But since dijit applies some extra layers of HTML around the button, the button gets a 100px padding. JSbin to show the problem edit: Found one (not IE6-compatible) solution: [widgetid=myBtn] { margin-left: 100px; } see above :-) Surround with a DIV and use that DIV in your static CSS. I think decorating with HTML may actually be a simpler solution than trying to bake more into the widget or the widget's template.

Dojo 1.9 build 'multipleDefine' error while loading locale

只谈情不闲聊 提交于 2019-12-05 04:39:52
My dojo application breaks after building, during loading the app, throwing 'multipleDefine' and giving this error: Error {src: "dojoLoader", info: Object} Message: multipleDefine info: Object {pid: "dojo", mid: "dojo/nls/dojo_en-us", pack: Object, url: "dojo/nls/dojo_en-us.js", executed: 5…} Here is my profile: var profile = { // `basePath` is relative to the directory containing this profile file; in this case, it is being set to the // src/ directory, which is the same place as the `baseUrl` directory in the loader configuration. (If you change // this, you will also need to update run.js.)

Programmatically set the selected value of a dijit Select widget

*爱你&永不变心* 提交于 2019-12-05 04:21:53
I'm populating a dijit select widget with options whenever another select widget's value changes. In my app, theres a dropdown menu for "Bus Route" and a dropdown menu for "Bus Stop". Users have assigned bus routes and stops that should be updateable. So when the page first loads, the route dropdown box has all routes available, and the route you are currently assigned to is the selected value. The stop menu is loaded with all stops associated with that route, but there is no selected value, so, as by default, it's the first option. Whenever the user changes the currently selected route, the

Dojo require, connect to error when module failed loading

∥☆過路亽.° 提交于 2019-12-05 04:13:17
When I try to load nonexistent module, it fail with 404 error (of course). I want to handle this error but don't know how to connect to "error" event. According to Dojo doc, I should be able to do that using its micro event api . This code does not work. var handle = require.on('error', function( error ) { alert('Finally error') }); require(['nonexistent/module'], function ( m ) { alert('Module was loaded correctly') }); Dojo version is 1.7.1, browser latest Chrome. The documentation on this one is a bit curious. I can get the 'error' event to fire after a short timeout (dojoConfig.waitSeconds

Constrain position of Dojo FloatingPane

故事扮演 提交于 2019-12-05 04:01:28
I have a dojox.layout.FloatingPane (as a custom dijit) which can be positioned anywhere within its enclosing div. My problem is that the user can potentially drag the FloatingPane completely outside of its container and be unable to retrieve it. Is there any easy way to force the FloatingPane to remain entirely visible at all times? Here's my code: dojo.provide("ne.trim.dijits.SearchDialog"); dojo.require("dijit._Widget"); dojo.require("dijit._Templated"); dojo.require("dojox.layout.FloatingPane"); dojo.declare("ne.trim.dijits.SearchDialog", [dijit._Widget, dijit._Templated], { templateString:

How to include JavaScript library into Spring MVC project (jQuery or Dojo, for instance)

人走茶凉 提交于 2019-12-05 03:39:34
问题 I have read more than 5 related threads here, but could not the answer: step-by step instructions. Till now I have the STS Spring MVC template structure and try to put jquery.js somewhere in my project (unfortunately, nobody says, where it should be). So, please say: where to place jquery.js in the project structure? how to refer to this location from .jsp? any other actions needed? like maven, app config changes? My jsp works perfectly with http://code.jquery.com/jquery-1.8.3.js , but

Dojo Exception on hiding a dijit.Dialog

空扰寡人 提交于 2019-12-05 02:38:33
问题 I have a Dialog with a form inside. The following code is just an example of what I'm trying to do. When you close a dijit.Dialog, if you dont't destroy recursively his children, you just can't reopen it (with the same id). If you don't want to destroy your widget you can do something like that : var createDialog = function(){ try{ // try to show the hidden dialog var dlg = dijit.byId('yourDialogId'); dlg.show(); } catch (err) { // create the dialog var btnClose = new dijit.form.Button({

test suite paths when using ArcGIS JSAPI as an alternate loader in intern

最后都变了- 提交于 2019-12-05 02:30:41
问题 I have an application built using ArcGIS Javascript API and I've been adding tests using intern. I run it under IIS in Windows 7 while developing. I had no trouble getting the intern tutorial working when getting started and after looking at How to specify alternate loader for intern I was able to set the loader in client.html to <script src="http://js.arcgis.com/3.7/"></script> and I was able get my tests running but only after I changed the path in both the query string and in intern.js to

Error: Tried to register widget with id==grid1but that id is already registered

与世无争的帅哥 提交于 2019-12-05 02:08:54
I am currently developing my personal website and part of my site I have a biased view pr avoid duplication of code ... and this view I have a dojox.grid.datagrid ... I can call this view twice in the same page (ruban.phtml) the problem is that I click on 1 button that is the appeal of this view (partial view) and then I click the 2nd button that is the appeal of this view I have an error: Error: Tried to register widget with id == grid but that id is already registered and to address this problem, I removed the jsId walk the grid and I declared a global variable is initialized when calling

How to load custom AMD modules when using Dojo via CDN?

六月ゝ 毕业季﹏ 提交于 2019-12-05 01:39:51
I am using google's CDN and also trying to load my own AMD modules using their loader. I know I'm doing something wrong but I'm stuck. Any ideas? <script src="https://ajax.googleapis.com/ajax/libs/dojo/1.7.0/dojo/dojo.js" type="text/javascript" data-dojo-config="async:true,parseOnLoad:true"></script> <script type="text/javascript"> require(["dojo/_base/kernel", "dojo/_base/loader", "dojo/parser"], function(dojo){ dojo.registerModulePath("pgGallery", "http://127.0.0.1:8080/js"); }); require(["pgGallery/Message"], function(m){ m.success("foo"); }); </script> http://127.0.0.1:8080/js/Message.js