dojo

Dojo: BorderContainer and ContentPanes not working inside of a custom widget template

时光毁灭记忆、已成空白 提交于 2019-12-05 19:20:56
Hey guys, im trying to create some custom templated widgets with dijit.layout objects (BorderContainer, ContentPane) in the template, and i just can't get it to work. Maybe SO can steer me in the right direction... here's my code so far: test.html <html> <head> <title>Test Page</title> <style type="text/css"> @import "http://ajax.googleapis.com/ajax/libs/dojo/1.4.1/dojo/resources/dojo.css"; @import "http://ajax.googleapis.com/ajax/libs/dojo/1.4.1/dijit/themes/tundra/tundra.css"; html, body, #page { width: 100%; height: 100%; overflow: hidden; } </style> <script type="text/javascript"> var

Dojo Dialog onEnd() animation exception

青春壹個敷衍的年華 提交于 2019-12-05 18:58:24
I have a problem with the Dojo Dijit Dialog .hide() method during the animation sequence. I am using Dojo 1.7 with Tundra theme. I have a cancel button in my dialog that closes the dialog. var global_welcome = new Dialog({ id: 'global_welcome', style: "width: 750px", draggable: false, content: '<button type="button" id="global_welcomeCancel"> Cancel </button>', onShow : function () { on(dojo.byId('global_welcomeCancel'), "click", function (evt) { dojo.stopEvent(evt); global_welcome.hide(); }); }); } }); This produces the following error on Firebug: exception in animation handler for: onEnd fx

custom event is not triggered on dojo widget

别等时光非礼了梦想. 提交于 2019-12-05 17:20:12
I have dojo Custom widget. I need to emit a event from the custom widget, this the code where I have added the event listener <!DOCTYPE html> <html> <head> <title></title> <script type="text/javascript"> var dojoConfig = { async: true, parseOnLoad: true, isDebug : true, packages:[ { name:"custom", location:"/Test/js" } ] }; </script> <script src="//localhost:8080/dojo1.9.0/dojo/dojo.js"></script> </head> <body> <script> require(["custom/MyWidget","dojo/on","dojo/dom-construct","dojo/_base/window","dojo/domReady!"],function(MyWidget,on,domconstruct,window){ var mywidget = new MyWidget();

Is it possible to combine Dojo with other JS frameworks?

≯℡__Kan透↙ 提交于 2019-12-05 16:37:39
问题 We are using Dojo (1.9.3) as a JS framework for building a single page application. We are however spending too much time on the quirks of Dojo, so even simple tasks take a long time to implement. And since there is lack of proper documentation, we often have to resort to reading the source code and then implementing a workaround. I feel that we would speed up development, and make it easier to maintain the code if we moved to some other framework. Our codebase is rather large, since it is a

how to save a filter in Dojo

我只是一个虾纸丫 提交于 2019-12-05 15:51:34
I have an EnhancedGrid that users regularly use complex filters on. Is there a way to allow users to save or bookmark a filter so they can easily re-apply it in future? I know I can programmatically set a filter, but I can't predict what filters my users will want. Thank you! edit: made some progress myself... using grid.getFilter() to return a JSON representation of the filter, then json.stringify(jsonRepresentation) to convert it into a string. Now I'm considering my options for how to store, load and convert that string. Would loading a string into a json object then applying it as my

How to open a browser window without any bars like address bars, bookmarks bars etc in javascript?

故事扮演 提交于 2019-12-05 15:23:41
问题 I am looking to open a url (html file) without any kind of address bars, bookmarks bar so that the user just sees the application window. Is there a way to do so? 回答1: window.open(url,'window','toolbar=no, menubar=no, resizable=yes'); You can read about these and more of the options here. 来源: https://stackoverflow.com/questions/31710446/how-to-open-a-browser-window-without-any-bars-like-address-bars-bookmarks-bars

Using requirejs with dojo 1.9.1

白昼怎懂夜的黑 提交于 2019-12-05 15:22:59
Can anybody provide me with a simple example of how to use requirejs to load dojo modules? The requirejs.org website indicates it is best to use the dojo loader until a ticket is resolved - but that ticket appears to be resolved and is now closed. I am encountering errors such as described here (duplicated below) only now with dojo 1.9.1. Error: TypeError: _3.add is not a function _3.add("dom-addeventlistener",!!document.addEventListener); (I have an existing backbone app that uses requirejs and am simply trying to integrate in dojo charting). You need to use the source/SDK version of the Dojo

How can I generate CMAC-AES in javascript

老子叫甜甜 提交于 2019-12-05 14:53:42
I am attempting to use the Stanford Javascript Crypto Library to generate an CMAC-AES token for an OAuth 2.0 assertion, but I'm far from being an expert with cryptography. Can someone give an example using sjcl or any open-license js library out there? I'm not even sure it's possible using sjcl's existing functions. I tried using an options object like I saw in this question , but I don't understand the modes or other options, and I couldn't find any documentation on this. I figure the salt and iv (to be a reproduceable MAC) would have to be static, but I don't know what values they should be.

wirejs and dojo using the dojo build system (2)

帅比萌擦擦* 提交于 2019-12-05 14:36:29
(This is the same question as wirejs and dojo using the dojo build system , but with more detail about the problem and tried solutions. The duplicate question is created because this was suggested in a comment). When building a dojo application that uses wire, the dojo loader throws an undefinedModule Error for "./lib/context" that we can't get rid of. I added wire to a large, working dojo project using a git submodule. It turned out that also cujojs when and cujojs meld are required. I added them as a git submodule too. In this project, libraries are not next to the application folder ( src

Dojo on a CDN vs own install

纵饮孤独 提交于 2019-12-05 14:21:28
I use quite a lot of Dojo, but to date I've only used it by including from a CDN such as AOL/Google. Are there advantages to hosting a copy of Dojo rather than using it via a CDN? I don't have much need to alter the code base, but I imagine there are other advantages/disadvantages? by hosting your own Dojo env. you are for example able to make a custom build of dojo. So you only need to load one *.js file. That saves traffic used by the xhr requests. -jstr Disadvantage to hosting anything externally is that you don't have control over it. You won't get this with the Google/AOL CDN but you