Fix js concat

master
Nick Sergeant 2012-01-25 10:13:08 -05:00
parent c78ae35ce5
commit 549d27d335
12 changed files with 28 additions and 6 deletions

13
snipt/fabfile.py vendored
View File

@ -8,7 +8,18 @@ def staticfiles():
local('sed -i -e \'s/\/media\//https:\/\/snipt.s3.amazonaws.com\//g\' %s/media/css/style.css' % BASE_PATH)
local('rm %s/media/css/style.css-e' % BASE_PATH)
local('cat %s/media/css/*.css > %s/media/cache/snipt.css' % (BASE_PATH, BASE_PATH))
local('cat %s/media/js/libs/*.js %s/media/js/plugins/*.js %s/media/js/src/*.js %s/media/js/src/modules/*.js > %s/media/cache/snipt.js' % (BASE_PATH, BASE_PATH, BASE_PATH, BASE_PATH, BASE_PATH))
js = [
'%s/media/js/libs/a_underscore.js' % BASE_PATH,
'%s/media/js/libs/b_jquery.js' % BASE_PATH,
'%s/media/js/libs/c_json2.js' % BASE_PATH,
'%s/media/js/libs/d_backbone.js' % BASE_PATH,
'%s/media/js/libs/e_bootstrap.js' % BASE_PATH,
'%s/media/js/plugins/*.js' % BASE_PATH,
'%s/media/js/src/*.js' % BASE_PATH,
'%s/media/js/src/modules/*.js' % BASE_PATH
]
local('cat %s > %s/media/cache/snipt.js' % (' '.join(js), BASE_PATH))
local('/Users/Nick/.virtualenvs/snipt/bin/python %s/manage.py collectstatic --ignore grappelli --ignore admin --noinput' % BASE_PATH)
def deployapp(m):

View File

@ -1,3 +1,4 @@
// Underscore.js 1.2.1
// (c) 2011 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore is freely distributable under the MIT license.

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,4 @@
var JSON;if(!JSON){JSON={};}
(function(){"use strict";function f(n){return n<10?'0'+n:n;}
if(typeof Date.prototype.toJSON!=='function'){Date.prototype.toJSON=function(key){return isFinite(this.valueOf())?this.getUTCFullYear()+'-'+

View File

@ -1,3 +1,4 @@
// Backbone.js 0.5.3
// (c) 2010 Jeremy Ashkenas, DocumentCloud Inc.
// Backbone may be freely distributed under the MIT license.

View File

@ -1,3 +1,4 @@
/**
* Bootstrap.js by @fat & @mdo
* plugins: bootstrap-modal.js

View File

@ -1,3 +1,4 @@
(function(jQuery){jQuery.hotkeys={version:"0.8",specialKeys:{8:"backspace",9:"tab",13:"return",16:"shift",17:"ctrl",18:"alt",19:"pause",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"insert",46:"del",96:"0",97:"1",98:"2",99:"3",100:"4",101:"5",102:"6",103:"7",104:"8",105:"9",106:"*",107:"+",109:"-",110:".",111:"/",112:"f1",113:"f2",114:"f3",115:"f4",116:"f5",117:"f6",118:"f7",119:"f8",120:"f9",121:"f10",122:"f11",123:"f12",144:"numlock",145:"scroll",191:"/",224:"meta"},shiftNums:{"`":"~","1":"!","2":"@","3":"#","4":"$","5":"%","6":"^","7":"&","8":"*","9":"(","0":")","-":"_","=":"+",";":": ","'":"\"",",":"<",".":">","/":"?","\\":"|"}};function keyHandler(handleObj){if(typeof handleObj.data!=="string"){return;}
var origHandler=handleObj.handler,keys=handleObj.data.toLowerCase().split(" ");handleObj.handler=function(event){if(this!==event.target&&(/textarea|select/i.test(event.target.nodeName)||event.target.type==="text")){return;}
var special=event.type!=="keypress"&&jQuery.hotkeys.specialKeys[event.which],character=String.fromCharCode(event.which).toLowerCase(),key,modif="",possible={};if(event.altKey&&special!=="alt"){modif+="alt+";}

View File

@ -1,3 +1,4 @@
(function($){$.InFieldLabels=function(label,field,options){var base=this;base.$label=$(label);base.label=label;base.$field=$(field);base.field=field;base.$label.data("InFieldLabels",base);base.showing=true;base.init=function(){base.options=$.extend({},$.InFieldLabels.defaultOptions,options);if(base.$field.val()!==""){base.$label.hide();base.showing=false;}
base.$field.focus(function(){base.fadeOnFocus();}).blur(function(){base.checkForEmpty(true);}).bind('keydown.infieldlabel',function(e){base.hideOnChange(e);}).bind('paste',function(e){base.setOpacity(0.0);}).change(function(e){base.checkForEmpty();}).bind('onPropertyChange',function(){base.checkForEmpty();});};base.fadeOnFocus=function(){if(base.showing){base.setOpacity(base.options.fadeOpacity);}};base.setOpacity=function(opacity){base.$label.stop().animate({opacity:opacity},base.options.fadeDuration);base.showing=(opacity>0.0);};base.checkForEmpty=function(blur){if(base.$field.val()===""){base.prepForShow();base.setOpacity(blur?1.0:base.options.fadeOpacity);}else{base.setOpacity(0.0);}};base.prepForShow=function(e){if(!base.showing){base.$label.css({opacity:0.0}).show();base.$field.bind('keydown.infieldlabel',function(e){base.hideOnChange(e);});}};base.hideOnChange=function(e){if((e.keyCode===16)||(e.keyCode===9)||(e.keyCode===27)){return;}
if(base.showing){base.$label.hide();base.showing=false;}

View File

@ -1,3 +1,4 @@
/*!
* jQuery UI 1.8.16
*

View File

@ -1,3 +1,4 @@
var snipt = {
module: function() {
var modules = {};

View File

@ -1,3 +1,4 @@
(function(Site) {
var Snipt = snipt.module('snipt');

View File

@ -1,3 +1,4 @@
(function(Snipt) {
Snipt.SniptModel = Backbone.Model.extend({