This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(["dojo/_base/lang", "dojo/_base/declare", "dojox/app/Controller"], | |
function(lang, declare, Controller){ | |
// module: | |
// dojox/app/tests/mediaQuery3ColumnApp/controllers/LogAllAppEvents | |
// summary: | |
// This Custom controller created to log all dojox/app events to see when these events are fired. | |
return declare("dojox/app/tests/mediaQuery3ColumnApp/controllers/LogAllAppEvents", Controller, { | |
constructor: function(){ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define(["require", "dojo/_base/lang", "dojo/_base/declare", "dojo/on", "dojo/Deferred", "dojo/when", "dojo/dom-style", "dojox/app/controllers/Load"], | |
function(require, lang, declare, on, Deferred, when, domStyle, Controller, View){ | |
// module: | |
// dojox/app/tests/nestedTestApp/controllers/CustomLoaderDefaults | |
// summary: | |
// A custom logger to handle always loading the defaultViews when a view is loaded for the first time. | |
// Bind "app-load" event on dojox/app application instance. | |
// Load child view and sub children at one time. | |
// | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This gist and Dojo is available under *either* the terms of the modified BSD license *or* the | |
Academic Free License version 2.1. As a recipient of Dojo, you may choose which | |
license to receive this code under (except as noted in per-module LICENSE | |
files). Some modules may not be the copyright of the Dojo Foundation. These | |
modules contain explicit declarations of copyright in both the LICENSE files in | |
the directories in which they reside and in the code itself. No external | |
contributions are allowed under licenses which are fundamentally incompatible | |
with the AFL or BSD licenses that Dojo is distributed under. | |
The text of the AFL and BSD licenses is reproduced below. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getParentFromViewTarget: function (viewTarget) { | |
// summary: | |
// A convenience function to get the Parent View for a View Target | |
// | |
// viewTarget: | |
// The view target, like "ParentView1,SubViewA,ChildViewX" | |
// | |
// Calls would look like this: | |
// | |
// var parentViewOfChildViewX = this.app.getParentFromViewTarget("ParentView1,SubViewA,ChildViewX"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
getViewFromViewId: function (app, viewId) { | |
if (viewId) { | |
var parts = viewId.split("_"); | |
parts.shift(); // remove app from parts | |
var view = app; | |
var nextChildId = app.id + "_"; | |
for (var item in parts) { | |
var childId = nextChildId + parts[item]; | |
view = view.children[childId]; | |
nextChildId = childId + "_"; |