dojo

AMD Loader disable, enable in theme

為{幸葍}努か 提交于 2019-12-02 03:58:42
I have a problem with the AMD Loader. I want bind the bootstrap-slider.js and the css into the application. All the javascript and css are declare in a theme. Now the slider js don't harmonize with the dojo js. I found the explains from Marky Roden and the XSnippet von Ferry Kranenburg. In the custom control the code is very good. But I want all that in the theme for all the application. But it don't work. Can I disable, enable the AMD Loader in a theme? I think that's possible. Create 2 additional JavaScript files: disable_amd.js with the following contents: if (typeof define === 'function' &

How to migrate dojo.connect code from Dojo 1.3.1 to 1.9.3

梦想的初衷 提交于 2019-12-02 03:50:47
I've following piece of code in my application which is written in Dojo 1.3.1 . My task if to migrate this code to Dojo 1.9.3 . My questions is that how I can achieve this? I'm a newbie to Dojo so don't know much about migration from old Dojo syntax to new. dialogWidget._proxyConnects.push(dojo.connect( newDialog._fadeIn, "onEnd", dialogWidget, "onLoad" )); EDIT I would also like to know that what the above piece of code will do actually? If anyone can explain this to me in one or two sentences. Thanks This part of Dojo migration guide should help you out. As on what this does -- you're

dojo declare correct way

走远了吗. 提交于 2019-12-02 03:21:23
file: dojo/dir1/utils/XmlJsonUtils.js // Author: Rajat Khandelwal define([ "dojo/_base/declare" // declare ], function(declare){ return declare("dir1.utils.XmlJsonUtils",[],{ parseXml : function (xml) { var self=this; var dom = null; if (window.DOMParser) { try { dom = (new DOMParser()).parseFromString(xml, "text/xml"); } catch (e) { dom = null; } } else if (window.ActiveXObject) { try { dom = new ActiveXObject('Microsoft.XMLDOM'); dom.async = false; if (!dom.loadXML(xml)) // parse error .. window.alert(dom.parseError.reason + dom.parseError.srcText); } catch (e) { dom = null; } } else alert(

How to query on object type in dojo?

放肆的年华 提交于 2019-12-02 03:09:23
We can use dojo.query to get certain elements based of CSS selectors but how do we query on object types? For example, get all the TextBox elements on the page and then use dojo.connect to bind a function? This is not completely supported, yet there are two ways of doing it as i see it. One, figure out which is the unique class for a TextBox ( .dijitTextBox ), call dojo.query('.dijitTextBox') , loop result dojo.forEach and get the widget with dijit.getEnclosingWidget(domnode) var textboxArray = []; dojo.forEach(dojo.query('.dijitTextBox'), function(domnode) { textboxArray.push(dijit

not able to call a function on pagination dojo enhancedGrid

那年仲夏 提交于 2019-12-02 03:04:40
问题 I tried all the possible ways but it's not working. I want to call a function when I move to another page in a dojo dataGrid (during pagination). I tried the below code, but it's not working... method one: nextPage = function(src) { alert("going"); }; grid.startup(); method two: grid.on("nextPage", function(evt){ alert("next"); }, true); method thee: grid.pagination.plugin.nextPage = function(src) { alert("here"); }; None of these methods are working. Please give sample code which will be

Using Dojo's dgrid, JsonRest and subrows/arrays

£可爱£侵袭症+ 提交于 2019-12-02 03:01:24
I have a grid that I am creating drawing off a JSON data source that is formatted like this: {"recordsReturned":10, "totalRecords":471, "startIndex":0, "sort":"num", "dir":"asc", "pageSize":100, "visitors":[ {"num":1, "uid": "1", "ipaddress": "24.217.129.98", "hostname": "", "referer": "", "useragent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_2) AppleWebKit/536.26.14 (KHTML, like Gecko) Version/6.0.1 Safari/536.26.14", "date":1352086661000}, {"num":2, "uid": "0", "ipaddress": "100.43.83.157", "hostname": "", "referer": "", "useragent": "Mozilla/5.0 (compatible; YandexBot/3.0; +http:/

Dojo can't programmatically concatenate djits?

不打扰是莪最后的温柔 提交于 2019-12-02 02:43:37
With this code: var d = new dijit.Dialog({ title: "Programatic Dialog Creation", style: "width: 300px", }); var button1 = new dijit.form.Button({'label': 'one', 'onClick': function () { alert('one') }}); var button2 = new dijit.form.Button({'label': 'two', 'onClick': function () { alert('two'); }}); d.attr("content", button1 + ' | ' + button2); d.show(); Expected result: A dialog with with two buttons inside Actual result: A dialog with the text [Widget dijit.form.Button, dijit_form_Button_4] | [Widget dijit.form.Button, dijit_form_Button_5] What am I doing wrong? What is the correct way to

dojo 1.8: Error: Tried to register widget with id==main_bContainer but that id is already registered

懵懂的女人 提交于 2019-12-02 02:29:18
问题 Hi I have a simple one as shown below that displays bordercontainer and contentpane. I do not understand why the bordercontainer's id is registered twice since I only have one id defined for bordercontainer. The error stated: Error: Tried to register widget with id==main_bContainer but that id is already registered Please advise where I got it wrong. <!DOCTYPE html> <html> <head> <title>Hello</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <link rel="stylesheet"

Want to create a combobox in dojo where the dropdown menu and autocompletion kicks in only after the user inputs 4 characters

淺唱寂寞╮ 提交于 2019-12-02 02:25:40
I wanted to create a combobox in dojo where the drop down menu and autocompletion kicks in only after the user inputs 3 characters. The current default will start showing the drop down menu and also autocomplete when the user enters the first character. Are there any attributes for getting this behaviour ? can i overload some functions ? Or should i write a separate widget of my own ? I can point you in the right direction: navigate to the API page here: http://dojotoolkit.org/api/ and look up dojox.validate.isText. There is a minlength flag that can be set that returns a boolean. Or, you

Dojo can't programmatically concatenate djits?

随声附和 提交于 2019-12-02 02:11:01
问题 With this code: var d = new dijit.Dialog({ title: "Programatic Dialog Creation", style: "width: 300px", }); var button1 = new dijit.form.Button({'label': 'one', 'onClick': function () { alert('one') }}); var button2 = new dijit.form.Button({'label': 'two', 'onClick': function () { alert('two'); }}); d.attr("content", button1 + ' | ' + button2); d.show(); Expected result: A dialog with with two buttons inside Actual result: A dialog with the text [Widget dijit.form.Button, dijit_form_Button_4]