Harry Devine | 24 Jun 14:44 2016
Picon
Picon

Issue with handling events

Everyone,

I have a situation where I want the user to select a row in a grid by either right-clicking and getting a context menu option or by double-clicking the row.  In both instances the same function in my module is called.  The grid exists in a dijit Dialog. When the function is called, I put some text onto the main page and close the dialog by calling its hide method. The next time I bring up that dialog and try the context menu or double-click, I get the module function called twice.  The next time will be 3 times, etc.  I think that the on handler is creating one instance for the context menu and 1 for the double-click, and not un-registering them when the dialog is closed.  I tried on.once, but that won't work as if I happen to try the context menu route and cancel it by clicking away, the double-click will never get called since once will stop the events after either once fires.

Any ideas?  I guess if I could find a way to unregister the on handler when I hide the dialog, that would be the best route, but I can't find out how to do that.  But I'm open to any other ideas.  I can try to put together a JSFiddle if my explanation doesn't make sense.

Thanks!
Harry
--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Franc23 | 20 Jun 19:44 2016
Picon

Extended Select row and non-contiguous select

Hi,

I don't understand why ctrl+click and shift+click in the module
extendedSelect.Cell don't do the same thing as in the module
extendedSelect.Row.

I want to be able to multi select non-contiguous row by holding ctrl+click
and select multilple row by holding shift+click or by sweeping with mouse
click.

With the module select.Row I can select non-contiguous row with ctrl+click
and the module extendedSelect.Row only allows shift+click for consecutive
row selection.

I was wondering if there is any way to achieve this in gridx.

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Extended-Select-row-and-non-contiguous-select-tp4006931.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

dolot | 17 Jun 20:57 2016

Having trouble with 'this'

I have the following function:

function theAdminDojoTools() {

    this.wireUserDeActivateEvents = function () {
        var userDiv = document.getElementById("userListDiv");
        var deactiveButtons =
userDiv.getElementsByClassName("deactivateUserButton")
        for (var i = 0; i < deactiveButtons.length; i++) {
            deactiveButtons[i].onclick = this.deactivateUser;
        }
    }

    this.deactivateUser = dojo.hitch(this, function (evt) {
        var UserId = evt.srcElement.dataset.userid;
        require(["dojo/request/xhr"], function (xhr) {
            var url = "/users/DeactivateUser"
            var postData = { id: UserId }
            new xhr(url, { method: "POST", data: postData
}).then(this.deactiveUserSuccess(), this.deactiveUserFailure());
        });
    });

    this.deactivateUserSuccess = dojo.hitch(this, function (data) {
        alert("user deactivated.")
    });

    this.deactivateUserFailure = function (data) {
        alert("failure deactivate")
    }

    var self = this;
}

The problem I'm having is in the deactivateUser function.  When this
function is called, in the xhr promise, deactiveUserSuccess is always
undefined (as is deactiveUserFailure :) ).  It seems that 'this' in this
context refers to the html element whose click event called deactivateUser .

I've tried referring to 'self' instead of 'this'.  No success.

I've tried removing the various dojo.hitch functions.  No success there
either.

'this' always refers to something other than 'theAdminDojoTools'.  

I have similar functionality in other parts of my app and it works just
fine.  I can't help but think I've overlooked something.

Any ideas?

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/Having-trouble-with-this-tp4006923.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Ronald MacCracken | 14 Jun 21:19 2016

Using Dojo's new flat theme

I am a bit puzzled on how to integrate the new flat theme with our application. It looks like there are two ways to go because the flat theme from GitHub is definitely different than the one provided with the latest version of Dojo.

 

For example, if I download the version from Esri (https://github.com/Esri/dojo-theme-flat), then I see that the dgrid folder has several files for dgrid extensions that the documentation below says is necessary to include in your site. And even more surprisingly, the Stylus variables file (https://github.com/Esri/dojo-theme-flat/blob/master/STYLUS/variables.styl ) defines its own colors.

 

If I then download the full source zip file for Dojo 1.11.1 (https://dojotoolkit.org/download/), I see that the dgrid folder has just a flat.css file that does not contain anything related to dgrid extensions. And then the Stylus variables file imports colors from "variables_material_colors" and references those rather than defining their own colors.

 

There may be other differences too, but those are the ones I see straight away. So if our app uses dgrid and its extensions, it appears that we should not use the flat theme distributed with Dojo. Is that choice a good one to use the Esri version rather than the Dojo version? I assume any bugs in the flat theme will be fixed in both places, but just seems strange that the theme would vary in such a basic way as how to define its colors? If I don't use the Dojo version, will I miss anything?

 

So before I go any further, I just want to make sure I am understanding it all correctly and don't make the wrong choice.

 

Thanks,

Ron

 

--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Gerhard Presser | 9 Jun 16:02 2016

[dgrid] add secondary sort-property

hi all,
in dgrid 0.3.x I used _getQueryOptions to add another - in fact primary - sorting property prior to actually query the store.
I need this, because I want to have some sort of grouping.
The user can just select one single sort criteria, and the rendering (in the header etc.) is just fine.

We recently switched to the latest dgrid+dstore - I'm having a hard time figuring out, how to build a similar system. It seems to me, that _StoreMixin.setCollection() may be a good starting-point. but the sort-array is given to the collection "as-is".

Is there any feature I'm missing?
regards

-- Gerhard Presser Groiss Informatics GmbH Strutzmannstraße 10 A-9020 Klagenfurt AUSTRIA Work: +43 463 504694-17 Fax: +43 463 504694-10 Web: www.groiss.com FN 168125v LG Klagenfurt | UID ATU44898401
--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Simon Walter | 8 Jun 08:33 2016

sorting dgrid/dstore

Hi all,

I am still working on a solution for this. I have found Ken's words here:
http://stackoverflow.com/questions/26783489/non-case-sensitive-sorting-in-dojo-dgrid

Ken or anyone else, where do I start to do this with dstore? I think 
your answer on SO was relevant to dojo/store. What do I extend/override? 
What function is called on sort? If there is documentation, forgive me, 
I must have missed it.

Simply, I want to override the sorting. It's not working well in 50% of 
the cases: integers do not sort correctly, and values from other 
database tables (think html select) do not sort correctly.

Thank you,

Simon
--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

dolot | 3 Jun 22:20 2016

How to use domReady with TypeScript

Just starting to play around with TypeScript and dojo and having a problem
right off.  I have the following TypeScript code:

class adminMockupTools {

    //code to do stuff.

}

require(["dojo/domReady!"], function () {
    //do some things after the dom loads
});

The problem that I'm having is that 'require' is not recognized by the
TypeScript Compiler.  I'm guessing this has something to do with something
being out of scope, but not sure how to fix it.

Any advice would be appreciated.

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/How-to-use-domReady-with-TypeScript-tp4006887.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

gow | 3 Jun 20:34 2016
Picon

what do you think?

Hi,

 

I've recently came across some interesting information, what do you thin about it? Please read here and tell me your opinion http://popraloti.failedfounder.com/aeoxydkn

 

gow <at> gow.net

--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
alex.r | 2 Jun 11:36 2016
Picon

How to update periodically paginated dgrid with server side Request collection

Hi,

I am trying to find a best way to update periodically paginated  dgrid 1.0
with data coming from Request-like collection using dstore 1.1.1.

Pagination extension is used in dgrid to paginate the data

At first I tried to call Dgrid.refresh() in function called from
setInterval. However, that results in complete rebuilding of grid rows. The
implementation of refresh()  removes all existing rows  and recreates them.
Invoking refresh periodically creates  flickering effect.  

Is there any way in existing dgrid/dstore implementation to update only
changed rows without removal and re-creation of not-changed rows?

I've seen couple other threads with similar issue where usage of
Cache/Trackable collections was suggested to solve the flickering effect.
However, it seems that combination of Cache/Trackable only make sense to use
if you have all data loaded whilst in my case only portion of a data is
requested from server and displayed in the grid.

I created a stackoverlow thread where I provided code samples demonstrating
the problem
http://stackoverflow.com/questions/37414480/how-to-update-paginated-dgrid-periodically

Any help/advise is appreciated.

Kind Regards,
Alex

--
View this message in context: http://dojo-toolkit.33424.n3.nabble.com/How-to-update-periodically-paginated-dgrid-with-server-side-Request-collection-tp4006885.html
Sent from the Dojo Toolkit mailing list archive at Nabble.com.
--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Colin | 31 May 18:38 2016
Picon
Gravatar

Any workflows for making client side code with dojo npm modules

In the past, I have used git submodules and bower for installing dojo dependencies, but I was also wondering if anyone has used the dojo modules on npm?

Are there any workflows with building client side code that use the dojo npm modules (something like dojo-boilerplate?)

Ref

I was checking these out but trying to run dojo-util build scripts directly seemed tripped up by the directory being named dojo-util instead of just util


-Colin
--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest
Forbes, Mike | 27 May 20:41 2016
Picon

dgrid 4.0 checkbox issue

Issue with dgrid 4.0 with Checkbox and receiving data from the server.

 

I have the current grid:

 

var CustomGrid = declare([OnDemandGrid, DijitRegistry, Selection, Selector]);

 

var self = this;

                  this.grid = new CustomGrid({

                           collection: this.store,

                           columns:

                                  {

                                  bValue: { label: "", sortable: false, selector: "checkbox"},

                                  name: self._createCell({ label: i18n.selectAll, sortable: false})},

                           selectionMode: "single",

                           allowSelectAll: true

                           }, this.gridNode);

                          

                     this.grid.startup(); 

 

 

JSON:

 

{bValue: true, name: “Alex”, id: index++}

{bValue: false, name: “Marc”, id: index++}

{bValue: true, name: “Stella”, id: index++}

 

 

For some reason the checkbox in the grid remain unchecked for the data with the value of “true”.  Is there something missing?

--

-- 
Dojo Toolkit: http://dojotoolkit.org/
Tutorials: http://dojotoolkit.org/documentation/

Dojo-interest <at> mail.dojotoolkit.org
To unsubscribe, visit: http://mail.dojotoolkit.org/mailman/listinfo/dojo-interest

Gmane