dojo

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

天大地大妈咪最大 提交于 2019-12-04 18:27:25
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 after the last column. If the viewport is narrowed, the last columns are not more visible (and no

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

血红的双手。 提交于 2019-12-04 18:12:35
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.styleRow(inRow); </script> The first commented line is to get normal behaviour when clicking a row.

The load sequence difference between template and templateUrl in angular directive

北城以北 提交于 2019-12-04 17:59:54
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 will understand my html code better. So I modify the code as following: Familysnap/directive

dijit.form.FilteringSelect with substring search

核能气质少年 提交于 2019-12-04 17:58:07
问题 dijit.form.FilteringSelect is close to what I need. I've tried lots of ways to do what I want, but being a dijit beginner I never know if I'm even going in the right direction. When I start typing in a FilteringSelect, I only see the options starting with what I typed. Like a query on value + "*" What I need is to see any option that has what I type anywhere. Like a query on "*" + value + "*" So if there is "Apple", "Banana" and "Orange", and I type "e", I should see "Apple" and "Orange". If

Testing a “Dojo” web application with Selenium

我只是一个虾纸丫 提交于 2019-12-04 17:46:59
问题 Has anyone done some extensive automation with Selenium and a Dojo-heavy web app? I'm looking for any issues or problem that you might have run into or issues related directly to the combination of Selenium and Dojo. 回答1: I've used Selenium extensively with a bunch of different web apps, including a few on Dojo. You should be fine. One practice I would recommend is to make sure all the components you'll be testing (both UI controls you'll be driving, as well as text components you'll be

Dojo Drag and drop: how to retrieve order of items?

倾然丶 夕夏残阳落幕 提交于 2019-12-04 16:56:05
I've created a Source object and configured (via the creator) so that it renders a set of data for my users to order as they wish. This is all working fine. However, I cannot figure out how to retrieve the data once the user has re-ordered it. getAllNodes returns the dom nodes; I need the original data objects. It is really easy — just use getItem() (described in the official documentation). Something like that will give you all data elements in order: var source = new dojo.dnd.Source(...); ... var orderedDataItems = source.getAllNodes().map(function(node){ return source.getItem(node.id).data;

How to exclude files from Dojo's Build System?

*爱你&永不变心* 提交于 2019-12-04 16:41:47
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.profile.js", "name": "my-app", "description": "This is My App", "version": "1.0", "main": "src" } And

ArcGIS API for JavaScript 与Dojo的关系

南楼画角 提交于 2019-12-04 16:08:39
API(之后都把ArcGIS API for JavaScript简称为API)构建在Dojo之上,从而充分利用Dojo来屏蔽各种浏览器差异。 那什么是Dojo呢? 伴随着Web2.0、Ajax和RLA的蓬勃发展,各种AJAX开发工具包发展起来,Dojo 正是其中的佼佼者。Dojo 为RIA的开发提供了完整的端到端的解决方案。 Dojo主要由3大模块组成,分别是Core、Dijit、DojoX Core提供Ajax、事件、基于CSS的查询、动画及JSON 等的相关操作API。 Dijit是一个可更换皮肤、基于模板的Web界面控件库,包含许多简单易用的小部件(Widget) DojoX包含一个工具库(Util)模块,该模块包含一个单元测试框架(DOH)、从Dojo源代码中生成文档工具,以及JavaScript资源打包与压缩工具 Dojo是一个分层的体系架构,最下面的一层是包系统,Dojo API的结构与Java很类似,它把所有的API分成不同的包,当使用某个API时,只需导入这个API所在的包。包系统上面是一层语言库,这个语言库里包含一些语言工具API,类似于Java的Util包。再上面一层是环境相关的包,这个包用于处理跨浏览器的问题。Dojo中的大部分代码都位于应用程序支持库中,由于太小的限制,上图中没有列出所有的包,开发人员经常调用这个层中的API,例如

Simple Login implementation for Dojo MVC

时光总嘲笑我的痴心妄想 提交于 2019-12-04 15:21:34
Is there any example on how to implement a simple login page/dialog? I have been trying to do it with dojo boilerplate (check my previous questions : Layout implementation for Dojo MVC ). So far, I have been able to display my dialog box. But I want to be able to get my data and on click event want to have an alert box for example (with his content). My view: <form action="Login" method="post" validate="true" id="loginForm"> <table width="258">   <tr> <td><label>Login</label></td> <td><input class="cell" type="text" trim="true" dojoType="dijit.form.TextBox" value="" name="login" id="userId"/><

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

烈酒焚心 提交于 2019-12-04 15:18:38
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 } //In IE files is undefined I have also tried to use dojo.connect(dojo.byId("uploadForm").data,