dojo

How to wait till require finished in dojo

♀尐吖头ヾ 提交于 2019-12-06 14:00:33
问题 I'm providing an infrastructure for other developers, and i'm using Dojo for it. In my Init function i'm using the 'require' method (of course) which one of the parameters are the callback function when all the modules have been loaded. The problem is that the client don't want to use callbacks. He wants to call me and line after to use me (to make my Init method synchronized) - and give him the code back after we for sure finished loading our modules. My Code <script src=..../dojo.js><

How do I use Dojo inside of Worklight correctly?

北城以北 提交于 2019-12-06 13:45:50
问题 I need some help as well as some advice on how to use Dojo correctly in my project. At the moment, this is what I'm doing: Say I setup a project named 'Test'. Test.html is the first file hit, and in that file I have the following: <script type="text/javascript" data-dojo-config="isDebug: false, async: true, parseOnLoad: true" src="dojo/dojo.js"></script> <script type="text/javascript" src="dojo/core-web-layer.js"></script> <script type="text/javascript" src="dojo/mobile-ui-layer.js"></script>

majorTicksColor by interval into dojox gauges using dojo toolkit

坚强是说给别人听的谎言 提交于 2019-12-06 13:32:31
问题 I'm trying to use dojo toolkit and exactly this gauge. In fact, I want a feature to majorTicksColor and minorTicksColor, I want the color depends for the interval, eg : from 0 to 30 green, from 30 to 70 yellow and from 70 red to 100, or maybe it is degraded. Like this image. Is that possible ? Thank you. Regards, 回答1: Something like this fiddle? The principal here is to use an aspect to enhance the drawRange method of the dojox/gauges/GlossyCircularGauge widget. // // Use the new

How can i add event listener to the content of dojo editor?

眉间皱痕 提交于 2019-12-06 13:32:17
问题 I am working with dojo editor. And I have a problem so could you help me to solve this problem. My problem is: how can I add event listener to tag that I input to the editor such as onClick, onMouseover, etc... For Example : I input an image tag to the editor content: var ed=dijit.byId("myEditor"); //my editor has id id myEditor var img = "<img src='myPic.jpg' alt='' id='myPic'/>"; //my image tag ed.forcus(); ed.execCommand("inserthtml", img); //insert image tag into editor content After

When declaratively creating a dojox.grid.DataGrid - how to specify nested data in the field attribute?

爱⌒轻易说出口 提交于 2019-12-06 12:19:36
I'm creating a dojox.grid.DataGrid in dojo 1.6 with the following notation: <table dojoType="dojox.grid.DataGrid"> <thead> <tr> <th field="id">ID</th> <th field="contact.name">Name</th> <th field="contact.tel">Telephone</th> <th field="contact.birthdate.time">Birthday</th> </tr> </thead> </table> The Data looks something like this: [{ 'id':1, 'contact':{ 'name':'Doh', 'firstname':'John', 'tel':'123-123456', 'birthdate':{ 'javaClass':'java.sql.Timestamp', 'time':1234567893434}} }] ID is rendered corectly, but all the others render as "...". I have tried to specify a formatter, setting the base

How to launch GridX column width recalculation after the grid has been started up?

自闭症网瘾萝莉.ら 提交于 2019-12-06 11:47:20
问题 According to documentation: https://github.com/oria/gridx/wiki/Create-the-Simplest-Gridx Never forget to call grid.startup(), since the column width calculation and layout rendering need to access the geometry information of grid DOM nodes. If I have the grid with columns, that have no width specified, and autoWidth is set to false , startup() calculates the size of columns so, that they fill the whole viewport horizontally. However, if viewport is expanded, and extra empty space is inserted

The load sequence difference between template and templateUrl in angular directive

可紊 提交于 2019-12-06 10:31:11
问题 We were facing this issue several days before. At that time, we were introducing Angular into our HTML5 based mobile family photo social application Family Snap. It's maintained by www.uhella.com. During the restructure, I moved the dojo code into directive inline, it works well. The calendar_month_datepicker (dojox.mobile.SpinWheelDatePicker) was successfully injected by dijit to be a huge Div then. After that, I want to separate it into individual html file as template, because html editor

Browse and select files from user hard drive gives undefined in IE

拜拜、爱过 提交于 2019-12-06 10:04:51
问题 when I use my input button to browse for the file on the user computer it works on FF, IE9 and Chrome. But when I am passing the files to the JS function in IE9 I get undefined, while it works perfectly in FF and Chrome. <form id="uploadForm" style='display:none;padding:1px;' method="post" enctype="multipart/form-data"> <input type="file" name="data" id="inFile" size="15" style="display:none" onchange="handleFiles(this.files)"/> function handleFiles(files){ //doing something with the files }

How to exclude files from Dojo's Build System?

白昼怎懂夜的黑 提交于 2019-12-06 09:52:13
问题 I'm following the official documentation page about the topic but I cannot configure it to ignore .txt files. I have a all.profile.js on the root of my project: var profile = (function(){ return { basePath: "./", releaseDir: "../web", action: "release", layerOptimize: "closure", optimize: "closure", cssOptimize: "comments", mini: true, stripConsole: "all", packages: [ { name: "myapp", location: "myapp" } ] }; })(); And this is the package.json inside the folder myapp : { "dojoBuild": "myapp

how can I expand, or make a dojo button wider?

青春壹個敷衍的年華 提交于 2019-12-06 09:16:37
I have this piece of code: <div dojoType="dijit.layout.ContentPane" style="width:200px;margin:0;padding:0;" doLayout="true"> <button dojoType="dijit.form.Button" style="width:100%;" doLayout="true"><span style="width:200px;"> </span></button></div> I think it is clear what I try to do. Do you know how I could make the button take 100% of it's container's width? Thank you. Alright, I got the answer at an IBM's forum, someone told me to override the dijit style: .dijitButtonNode{ width:100%; } and that did the job :-) if you need to change the width for a single instance, changing the CSS class