dojo

define is not defined when trying to run my intern dojo tests

孤街浪徒 提交于 2020-01-14 05:40:29
问题 I've been trying to get intern to run with the intern-cucumber plugin for ages now. I am super confused about how to get my intern test even running. This is my file structure: project features ar.feature addition.feature models calculator.js tests addition.js ar.js intern.json package.json I want to create unit tests that run in the browser . The main issues arise with my arizona.js file, because it depends on several dojo libraries. Currently, my intern.json configuration file looks like: {

define is not defined when trying to run my intern dojo tests

假装没事ソ 提交于 2020-01-14 05:40:14
问题 I've been trying to get intern to run with the intern-cucumber plugin for ages now. I am super confused about how to get my intern test even running. This is my file structure: project features ar.feature addition.feature models calculator.js tests addition.js ar.js intern.json package.json I want to create unit tests that run in the browser . The main issues arise with my arizona.js file, because it depends on several dojo libraries. Currently, my intern.json configuration file looks like: {

Dojo extending dojo.dnd.Source, move not happening. Ideas?

孤街浪徒 提交于 2020-01-14 03:59:46
问题 NOTICE: THIS IS SOLVED, I WILL PUBLISH THE SOLUTION HERE ASAP. Hey all, Ok... I have a simple dojo page with the bare essentials. Three UL's with some LI's in them. The idea si to allow drag-n-drop among them but if any UL goes empty due to the last item being dragged out, I will put up a message to the user to gie them some instructions. In order to do that, I wanted to extend the dojo.dnd.Source dijit and add some intelligence. It seemed easy enough. To keep things simple (I am loading Dojo

How to add widget to Dojo gridx/Grid header?

自作多情 提交于 2020-01-14 03:20:11
问题 I have gridx/Grid (http://oria.github.io/gridx/) and I want to add some widgets in header cells like textboxes, dropdowns etc. Is there a way to put widget in header cell? 回答1: It seems that what you need is a module called HeaderRegions . Here is it's API . Especially note the add and refresh methods. For a simple example take a look here. To affect only one column header, use a predicate on the argument (column) provided by the callback that is the first argument of add (easiest would be to

No data showing in dojox.grid.DataGrid

≯℡__Kan透↙ 提交于 2020-01-13 19:39:52
问题 I am using dojo 1.3 and having problems getting this dojox.grid.DataGrid working. I am sure it is my ignorance. I have been reading over the Dojo Campus examples and beleive I have right. My html looks like: <script type="text/javascript"> dojo.require("dojox.grid.DataGrid"); dojo.require("dojo.data.ItemFileWriteStore"); </script> <div dojoType="dojo.data.ItemFileWriteStore" jsId="forumsStore" url="action/forum.JsonForums"></div> <div id="ForumsListingArea" name="ForumsListingArea"> <div id=

Dojo datagrid with date and time

拥有回忆 提交于 2020-01-13 19:23:48
问题 Could someone here please, for the love of God!, post an example of an working dojox.grid.DataGrid using a dojox.data.JsonRestStore, with 2 columns, date and time? I have tried the following : <th field="startdate" cellType="dojox.grid.cells._Widget" widgetClass="dijit.form.DateTextBox" editable="true" formatter="formatDate"></code></pre> and <th field="starttime" cellType="dojox.grid.cells._Widget" widgetClass="dijit.form.TimeTextBox" editable="true" formatter="formatDate"> Also : <th field=

dojo.connect won't connect 'onclick' with button

扶醉桌前 提交于 2020-01-13 09:30:33
问题 I'm running into a problem using dojo.connect() to connect an 'onclick' event with this button: <button dojoType="dijit.form.Button" widgetId="inbox_button" id="inbox_button">Inbox</button> and the code making the connection is: var inbox_button=dojo.byId("inbox_button"); dojo.connect(inbox_button,'onclick',function(){ var container=dijit.byId("center"); container.addChild(new dijit.layout.ContentPane({region: "left", content: "...", style: "width: 100px;"})) }); However, instead of executing

Tried to register widget with id==valores0 but that id is already registered

不羁的心 提交于 2020-01-13 09:21:50
问题 i get this error, and i don't know how can be solved. I read this link before. EDIT:1 index.php <script type="text/javascript"> $(document).ready(function() { $("#customForm").submit(function() { var formdata = $("#customForm").serializeArray(); $.ajax({ url: "sent.php", type: "post", dataType: "json", data: formdata, success: function(data) { switch (data.livre) { case 'tags': $("#msgbox2").fadeTo(200, 0.1, function() { $(this).html('Empty tags').fadeTo(900, 1); }); break; default: $("

DOJO xhrGet how to use returned json object?

巧了我就是萌 提交于 2020-01-12 08:49:09
问题 How can I access the data returned from the xhrGet outside of the get itself? Firebug shows that the "json" object has an array called results, which stores the json Object from the response, but when I try to access it it is null. So: how do I access the received data on the last code line? var json = dojo.xhrGet({ url :'/disease_web/graphMlDownload/getEdgeInformation/', handleAs:"json",content : { edgeid : edgeId, graphname:this._canvas.path}, load:function(response){ return response; } });

Debugging Closure-compiler Compiled Javascript

人走茶凉 提交于 2020-01-11 05:46:09
问题 I have a complex dojo app that works correctly uncompiled, but after compiling with Google's Closure Compiler, I get subtle differences in some behaviours. As it is, it's exceedingly difficult to debug, and I've been unable to find any information about possible functional differences between compiled and uncompiled Javascript with Google Closure. Can anyone point me in the direction of known differences, or share any similar experiences and some ideas of where to start looking? 回答1: General