dojo

Calling Chai plugin in Intern returns error

你说的曾经没有我的故事 提交于 2019-12-24 06:42:47
问题 I was trying to use the sinon-chai plugin within Intern but it gave me: Error {stack: (...), message: "Cannot find the Node.js require"} I had installed the plugin via npm and here's my test file: define([ 'intern!bdd', 'intern/chai!expect', 'app/functions', 'intern/chai', 'intern/dojo/node!sinon-chai' ], function (bdd, expect, myapp, chai, sinonChai) { chai.use(sinonChai); ... }); What might go wrong? 回答1: The node loader requires Node.js, so it can't be used in the browser. You'll need to

Can I open a specific entry in a dojo accordion?

◇◆丶佛笑我妖孽 提交于 2019-12-24 05:59:48
问题 I want to put links in the left navigation of my application that open an xPage and select a specific accordion entry. Not sure how to do this Any thoughts? 回答1: I am assuming here that you want to do this programmatically. Look into this answer- https://stackoverflow.com/a/1190455/1047998 - which describes the usage of selectChild which is used to select specific accordion pane. You can also go through the Dojo API documentation of dijit.layout.AccordionContainer - http://dojotoolkit.org/api

Can I open a specific entry in a dojo accordion?

牧云@^-^@ 提交于 2019-12-24 05:59:08
问题 I want to put links in the left navigation of my application that open an xPage and select a specific accordion entry. Not sure how to do this Any thoughts? 回答1: I am assuming here that you want to do this programmatically. Look into this answer- https://stackoverflow.com/a/1190455/1047998 - which describes the usage of selectChild which is used to select specific accordion pane. You can also go through the Dojo API documentation of dijit.layout.AccordionContainer - http://dojotoolkit.org/api

dojo Datagrid filter select that allows user to select from a list of values in the column

强颜欢笑 提交于 2019-12-24 05:55:22
问题 I m using dojo datagrid which contains 2 columns "name" and "age" , the requirement is to provide the filtering option on the "name" column in the datagrid. so that user can search and select his/her name from the list of values ,by clicking on the header of the name column. Is there any option that need to set in layout for the same. can some one please help on this. var layout = [ {field: "Name", name: "Name", width: '200px' }, {field: "Age", name: "Age", width: '100px' }, ]; var

“dojo is not defined” - Firefox 3.5 issue?

一个人想着一个人 提交于 2019-12-24 03:29:15
问题 Please take a look at this code: http://3wcloud-com-provisioning-qa.appspot.com/testAjaxDojo Just tab off the "domain" input field to try to make the Ajax run. (Note: the test Ajax web service always sends back the same message, it pretends to check if domain is available but it really doesn't). When running in Firefox 3.5, I get "dojo not defined" on the dojo.xhrGet statement. It works fine in IE7 and Chrome browsers, and one friend tested on Firefox 3.0 and it worked. 1) Is there something

dojo dijit.Dialog destroy underlay error

扶醉桌前 提交于 2019-12-24 03:09:10
问题 I have a class that extends dijit.Dialog but only to set default functionality and buttons for my site. When clicking the dialog's cancel button the following code is run: this.actionDialog.destroyRecursive(); this.actionDialog.destroy(); nb this.actionDialog = dijit.Dialog Sometimes (not always) the following error gets thrown: Uncaught TypeError: Cannot call method 'destroy' of undefined DialogUnderlay.xd.js:8 Which causes following dialogs to incorrectly display. I am using 1.5 from Google

dojo dijit.form.DateTextBox constraints not working, datetextbox

有些话、适合烂在心里 提交于 2019-12-24 02:40:59
问题 Hi I'm new to javascript and dojo. I'm trying to use two dijit DateTextBoxes with the drop-down calendars to establish a date range for a query on a database. I want to restrict the dates available, once the begin or end date has been selected, so that its impossible to pick an end date that is chronologically before the begin date, and vice versa. I'm trying to apply the example called 'changing constraints on the fly' (about half way down the page) from the dojo reference here: http:/

Invoking a Javascript from Lotus Notes on click of a button

橙三吉。 提交于 2019-12-24 02:38:13
问题 I am building a Proof Of Concept for a component that was earlier built in vb6. Since the component has complex UI elements, I am not really sure how far i can reproduce the same thing with Lotus Notes UI elements. What I am now currently looking to do is the following. Create a Button in an exist LN form. When the button is clicked it invokes a javascript which will create a template (or load the htm dynamically) htm page with the necessary interface elements. Use jQuery or Dojo to Ajaxify

Updating Dojo provide

ε祈祈猫儿з 提交于 2019-12-24 02:06:11
问题 I am using Dojo 1.9 for a project, but I don't understand the correct alternative of dojo.provide in the AMD style as compared to the legacy style. I was reading this documentation page. So apparanently this is how the old syntax maps to the new one: OLD dojo.provide("acme.Dialog"); dojo.require("dijit._Widget"); dojo.require("dojo.date"); CODE HERE NEW define(["dijit/_Widget", "dojo/date"], function(_Widget, date){ .... CODE HERE return MyWidget; }); I am not sure what exactly am I returning

Changing constraints on the fly

﹥>﹥吖頭↗ 提交于 2019-12-24 01:33:06
问题 I have a dijit.form.NumberTextBox input field that starts out with these parms: new dijit.form.NumberTextBox({ id: din1, style: "width:60px", constraints: { places: 0, pattern: '######' } }, din1); Everything works great..My question is I would like to change 'places' and 'pattern' parms on the fly. So I wrote this to change 'places' and 'patterns' parms: var myFldObj = dijit.byId(din1); if (myFldObj) { var myConstObj = myFldObj.attr('constraints'); if (myConstObj) { myConstObj.places = 2;