dojo

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

一世执手 提交于 2019-12-22 04:04:30
问题 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([

dojox.grid.DataGrid - onStyleRow needs update? (dojo 1.2.0)

女生的网名这么多〃 提交于 2019-12-22 00:42:52
问题 we are using a dojox.grid.DataGrid in a jsp. <script type="dojo/method" event="onStyleRow" args="inRow"> var grid = dijit.byId("someID"); var item = grid.getItem(inRow.index); if(item != undefined) { if(item.someAttribute == "1") { inRow.customClasses = "dojoxGridMYRow"; } else { inRow.customClasses = "dojoxGridRow"; } } if(aBoolean) { inRow.customStyles = "backgrund-color: #FFCC00"; } //dojox.grid.DataGrid.prototype.onStyleRow.apply(this, arguments); //grid.focus.styleRow(inRow); //grid.edit

Whats the best way to programatically open a pane inside Dijit AccordionContainer

会有一股神秘感。 提交于 2019-12-21 23:00:40
问题 I am trying open & close accordion panes programatically. Here is the simplified version of my code. Even though I set the first pane's selected to false and and second pane's selected to true, only the first pane opens when it loads on the browser (FF3). var accordionContainer = new dijit.layout.AccordionContainer().placeAt("test"); var accordPane = new dijit.layout.ContentPane({"title": "test", "content":"hello"}); var accordPane2 = new dijit.layout.ContentPane({"title": "test1", "content":

Dojo + Rails 3.2.8 + CoffeeScript

只谈情不闲聊 提交于 2019-12-21 21:11:22
问题 I'm trying to use Dojo Toolkit 1.8 instead JQuery in a Rails 3.2.8 web application, mainly due of the lack of a complete and visually uniform widget based on JQuery. Followed these steps: Unzip dojo, dijit and dojox directories into app/assets/javascripts Changed in application.js //= require_tree . to //= require_directory . Edited application layout (Not unobtrusive yet... just to effect of testing) views/layouts/application.html.erb <!DOCTYPE html> <html> <head> <title>Dojo</title> <%=

Dijit TabContainer Events - onFocus

旧城冷巷雨未停 提交于 2019-12-21 20:37:26
问题 I have a Tab Container and I want to execute some js when I click on a tab's title bar. I can't seem to figure out how to add an event to that. EDIT: It looks like I'll be using onFocus, but I'm still having trouble finding the proper syntax. EDIT: Found onFocus and onBlur, but still having trouble getting it to work. 回答1: You need to connect to the _transition event. var tabs = dijit.byId("tabs"); dojo.connect(tabs,"_transition", function(newPage, oldPage){ console.log("I was showing: ",

Struts2 plugins - Dojo or jQuery or…?

那年仲夏 提交于 2019-12-21 20:27:34
问题 Since Apache Struts has deprecated Dojo plugin from Struts 2.1.x I am thinking to change everything to jQuery. I especially noticed the difference in sizes (170kb vs 19kb - something like that). I had troubles with IE browser with handling dojo scripts, is this happening also with jQuery (when user is working with the application for a long time, script stops running)? I have a lot of dojo tags in my applications, and I use most of theirs attributes. Has anyone had any experience doing that?

Dijit Tree filtering and search not working on ObjectStoreModel

偶尔善良 提交于 2019-12-21 14:06:10
问题 I have created a dijit tree and a textbox and I want to filter the tree nodes based on keywords provided in textbox. I implemented the solution provided in another question but it does not seem to work. When the user enter some word in textbox the tree is re-populated with same data. dijit.Tree search and refresh Following is my code: require(["dijit/form/TextBox","dojo/store/Memory","dijit/tree/ObjectStoreModel","dijit/Tree","dojo/domReady!"], function(TextBox, MemoryStore, ObjectStoreModel,

How to debug Dojo in browser?

情到浓时终转凉″ 提交于 2019-12-21 09:34:45
问题 I'm currently (trying) to develop an app with Worklight Studio 5.0.6 and Dojo (Mobile) 1.8.3. I have a really hard time to to find a proper method for debugging. After waiting 5-10 minutes for the build an deploy-process on the server, an error usually looks like this in the Chrome debugger: How am I supposed to track down this error in MY source? The whole stack trace consists entirely of Dojo code which generates an absolutely useless error message after 20 abstraction layers. Seriously,

Dojo build -> dojo.require(); still needed?

て烟熏妆下的殇ゞ 提交于 2019-12-21 05:21:39
问题 this was my first dojo build so please excuse my ignorance in this matter. I've just created my custom build from dojo build system using the following (very simplified) profile: dependencies = { stripConsole: "normal", layers: [ { name: "../dijits/cx/dijitsCXbuild.js", copyrightFile: "CopyrightCX.txt", dependencies: [ "dojo.parser", "dijit.dijit", "dijit._Widget", "dijit._Templated", "dijit._Container", "dojo.i18n", "dojo.NodeList-fx", "dojox.grid.cells", "dojox.grid.DataGrid", "dojox.layout

Why can't I roll a loop in Javascript?

僤鯓⒐⒋嵵緔 提交于 2019-12-21 02:38:16
问题 I am working on a web page that uses dojo and has a number (6 in my test case, but variable in general) of project widgets on it. I'm invoking dojo.addOnLoad(init), and in my init() function I have these lines: dojo.connect(dijit.byId("project" + 0).InputNode, "onChange", function() {makeMatch(0);}); dojo.connect(dijit.byId("project" + 1).InputNode, "onChange", function() {makeMatch(1);}); dojo.connect(dijit.byId("project" + 2).InputNode, "onChange", function() {makeMatch(2);}); dojo.connect