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
// These checks ensure the namespace is only created if it doesn't already exist. | |
var myNamespace = myNamespace || {}, | |
// A check is required for each subsequent property of the namespace | |
application = myNamespace.application || {}, | |
myFunc = myNamespace.application.anotherProperty.myFunc || function () { | |
// function definition... | |
}; |
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
/** | |
* @name: [namespace] adds properties to the current namespace object. | |
* @argument[0] [name_str] {String} the propert(y/ies) we want to add. | |
* @returns {Object} the augmented namespace. | |
*/ | |
// Check for the namespace, create it if not already defined | |
(MyNamespace || MyNamespace = {}).namespace = function(name_str) { | |
// Split the name string into an array of parts | |
var parts = name_str.split('.'), | |
part, i, len, |
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
// Top-level namespace | |
var MyNamespace = {}; | |
// Adding properties to my namespace | |
MyNamespace.application = {}; | |
// OR | |
MyNamespace.['application'] = {}; |
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
sky.home_move.Popouts = function(pod) { | |
sky.home_move.Popouts.pods.push(pod); | |
this.pod = $(pod); | |
this.helpBtn = this.pod.find('a.help').eq(0); | |
this.inputs = this.pod.find(':input:not(:image, :radio)'); | |
this.radios = this.pod.find('input[type="radio"]'); | |
this.setupEventListeners(); | |
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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> | |
<title>test</title> | |
</head> | |
<body> | |
<fieldset> | |
</fieldset> |
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
var debug = function(text) { | |
( (window.console && console.log) || window.alert).call(this, text); | |
} |
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
class PostAdmin: | |
... | |
... | |
// CommonMedia defined as a subclass of PostAdmin | |
class CommonMedia: | |
js = ( | |
'https://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojo/dojo.xd.js', | |
'/appmedia/admin/js/editor.js', | |
) | |
css = { |
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
class CommonMedia: | |
js = ( | |
'https://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojo/dojo.xd.js', | |
'/appmedia/admin/js/editor.js', | |
) | |
css = { | |
'all': ('/appmedia/admin/css/editor.css',), | |
} | |
// Register new class |
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
/* Import standard Dojo CSS files */ | |
@import "https://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dijit/themes/claro/claro.css"; | |
/* Import custom style sheets for plugins */ | |
@import "https://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojox/editor/plugins/resources/css/FindReplace.css"; | |
@import "https://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojox/editor/plugins/resources/css/ShowBlockNodes.css"; | |
@import "https://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojox/editor/plugins/resources/css/InsertEntity.css"; | |
@import "https://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojox/editor/plugins/resources/css/CollapsibleToolbar.css"; | |
@import "https://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojox/editor/plugins/resources/css/Blockquote.css"; | |
@import "https://ajax.googleapis.com/ajax/libs/dojo/1.6.0/dojox/editor/plugins/resources/css/PasteFromWord.css"; |
NewerOlder