Skip to content
This repository has been archived by the owner on Apr 9, 2023. It is now read-only.

Commit

Permalink
made the define() methods correctly define the module, created an ini…
Browse files Browse the repository at this point in the history
…t script for deco, and got the build loading all the scripts
  • Loading branch information
Joel Kleier committed Feb 28, 2013
1 parent 6355c79 commit 1ce1d4e
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 22 deletions.
4 changes: 2 additions & 2 deletions plone/app/deco/resources/src/Makefile
Expand Up @@ -33,8 +33,8 @@ deco: clean_deco $(DECO)
# ----------------------------------------------------------------------- #

build/deco.full.js:
$(JAM) compile -i js/toolbar -e jquery --no-minify --almond $@
echo "require(['deco']);" >> $@
$(JAM) compile -i js/deco.init -e jquery --no-minify --almond $@
echo "require(['deco.init']);" >> $@

build/deco.min.js: build/deco.full.js
$(UGLIFYJS) build/deco.full.js > $@
Expand Down
5 changes: 2 additions & 3 deletions plone/app/deco/resources/src/js/deco.column.js
@@ -1,7 +1,6 @@
define(
"deco.column",
["jquery", "deco"],
function($) {
["js/deco"],
function() {

$.deco.Column = function(el) {
var self = this;
Expand Down
5 changes: 5 additions & 0 deletions plone/app/deco/resources/src/js/deco.init.js
@@ -0,0 +1,5 @@
define(
['js/deco', 'js/deco.toolbar', 'js/deco.panel', 'js/deco.row', 'js/deco.column', 'js/deco.tile'],
function(){

});
8 changes: 3 additions & 5 deletions plone/app/deco/resources/src/js/deco.js
@@ -1,12 +1,10 @@
define(
"deco",
["jquery"],
function($) {
function() {

// create a namespace for deco functionality
$.deco = {
NUM_GRID_COLUMNS = 12;
}
NUM_GRID_COLUMNS: 12
};


$.each(['Toolbar','Panel','Row','Column','Tile'], function(i, name) {
Expand Down
5 changes: 2 additions & 3 deletions plone/app/deco/resources/src/js/deco.panel.js
@@ -1,7 +1,6 @@
define(
"deco.panel",
["jquery", "deco"],
function($) {
["js/deco"],
function() {

$.deco.Panel = function(el) {
this.el = el;
Expand Down
5 changes: 2 additions & 3 deletions plone/app/deco/resources/src/js/deco.row.js
@@ -1,7 +1,6 @@
define(
"deco.row",
["jquery", "deco"],
function($) {
["js/deco"],
function() {

$.deco.Row = function(el) {
var self = this;
Expand Down
5 changes: 2 additions & 3 deletions plone/app/deco/resources/src/js/deco.tile.js
@@ -1,7 +1,6 @@
define(
"deco.tile",
["jquery", "deco"],
function($) {
["js/deco"],
function() {

$.deco.Tile = function(el) {
var self = this;
Expand Down
5 changes: 2 additions & 3 deletions plone/app/deco/resources/src/js/deco.toolbar.js
@@ -1,7 +1,6 @@
define(
"deco.toolbar",
["jquery", "deco"],
function($) {
["js/deco"],
function() {

$.deco.Toolbar = function(el) {
this.el = el;
Expand Down

0 comments on commit 1ce1d4e

Please sign in to comment.