overlay_me 0.12.1 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -46,6 +46,9 @@ button {
46
46
  }
47
47
  }
48
48
 
49
+ $right_arrow: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANCAYAAAB7AEQGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAKtJREFUeNpiuHz5ctD///+lgJgBF2Z68uRJOgMDw0EgNmTAAZiA4AeQVgHiA0CchFUREpsPiOcCjZ8NZWNVBAaMjIwpQGofEOvjVAQFxkATDwJxMkgNCy7HAk3kB1KzgApf4DIJBD4CcRpQ8TZcJp2D+vQiVjcBjZ8HpBxhCtAVfQbiVKDxIMd+QtbI8u/fP04gfQ+Iw4D4LDa7WSQlJUGBdxyIn+DyAUCAAQDxsEXD9kreLQAAAABJRU5ErkJggg==);
50
+ $down_arrow: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAJCAYAAADpeqZqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIlJREFUeNpivHDhQujz589TmZiYvjMQAP/+/eOQkZGZyfD//38ZIL77nzhwG4ilQJpA2BiIPxHQ8BGIDUHqYZpAOIWApiSYWmRNIDfPxaYaKD4bWR2KJiDmA+KzaHrOQMVxagJhfSD+ALXhA5TPQEgTCCcD8V+gpmRs8rg0MQI1eANpJmzyAAEGAKD/bax/HrzbAAAAAElFTkSuQmCC);
51
+
49
52
  .menu-item {
50
53
  text-align: left;
51
54
  background-color: #CCC;
@@ -59,7 +62,7 @@ button {
59
62
  width: 13px;
60
63
  height: 9px;
61
64
  border: none;
62
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAJCAYAAADpeqZqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIlJREFUeNpivHDhQujz589TmZiYvjMQAP/+/eOQkZGZyfD//38ZIL77nzhwG4ilQJpA2BiIPxHQ8BGIDUHqYZpAOIWApiSYWmRNIDfPxaYaKD4bWR2KJiDmA+KzaHrOQMVxagJhfSD+ALXhA5TPQEgTCCcD8V+gpmRs8rg0MQI1eANpJmzyAAEGAKD/bax/HrzbAAAAAElFTkSuQmCC) no-repeat center 3px;
65
+ background: $down_arrow no-repeat center 3px;
63
66
  span {
64
67
  display: none;
65
68
  color: yellow;
@@ -80,7 +83,7 @@ button {
80
83
  &.collapsed {
81
84
  .item-content { display: none; }
82
85
  a.collaps-button {
83
- background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANCAYAAAB7AEQGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAKtJREFUeNpiuHz5ctD///+lgJgBF2Z68uRJOgMDw0EgNmTAAZiA4AeQVgHiA0CchFUREpsPiOcCjZ8NZWNVBAaMjIwpQGofEOvjVAQFxkATDwJxMkgNCy7HAk3kB1KzgApf4DIJBD4CcRpQ8TZcJp2D+vQiVjcBjZ8HpBxhCtAVfQbiVKDxIMd+QtbI8u/fP04gfQ+Iw4D4LDa7WSQlJUGBdxyIn+DyAUCAAQDxsEXD9kreLQAAAABJRU5ErkJggg==) no-repeat center top;
86
+ background: $right_arrow no-repeat center top;
84
87
  }
85
88
  }
86
89
  }
@@ -123,12 +126,14 @@ button {
123
126
  .slider-block {
124
127
  display: block;
125
128
  label {
126
- font-size: 70%;
129
+ font-size: 60%;
127
130
  margin: 0 5px 0 0;
128
131
  vertical-align: top;
129
132
  }
130
133
  input[type=range] {
131
134
  margin: 0;
135
+ height: 14px;
136
+ width: 120px;
132
137
  }
133
138
  }
134
139
 
@@ -137,19 +142,27 @@ button {
137
142
  width: $image_mgnt_width;
138
143
 
139
144
  .controls {
140
- padding-bottom: 5px;
145
+ padding-bottom: 2px;
141
146
  label {
142
147
  margin-right: 5px;
143
148
  }
144
149
  }
145
150
 
151
+ .overlay-image-block, .images_dir {
152
+ border: $border;
153
+ border-right: none;
154
+ border-left: none;
155
+ padding-top: 2px;
156
+ &:first-child {
157
+ border-top: none;
158
+ padding-top: 0;
159
+ }
160
+ }
161
+
146
162
  .overlay-image-block {
147
163
  text-align: left;
148
164
  position: relative;
149
165
  width: $image_mgnt_width;
150
- border: $border;
151
- border-right: none;
152
- border-left: none;
153
166
  &.hovered {
154
167
  background-color: rgba(yellow, 0.5);
155
168
  }
@@ -168,14 +181,41 @@ button {
168
181
  padding: 0 3px;
169
182
  }
170
183
  }
184
+
185
+ .images_dir {
186
+ line-height: 18px;
187
+ .sub-block {
188
+ border-left: 2px white solid;
189
+ padding-left: 2px;
190
+ margin-left: 5px;
191
+ }
192
+ &>input[type=checkbox] {
193
+ -webkit-appearance: none;
194
+ background: $right_arrow no-repeat center center;
195
+ display: inline-block;
196
+ width: 13px;
197
+ height: 13px;
198
+ &:checked {
199
+ background: $down_arrow no-repeat center center;
200
+ width: 13px;
201
+ height: 13px;
202
+ margin: -2px 5px 0 0;
203
+ }
204
+ }
205
+ }
171
206
 
172
207
  .dynamic-adds {
208
+ padding-top: 4px;
173
209
  label {
174
210
  font-size: 75%;
175
211
  }
176
212
  input {
177
213
  width: 95px;
178
214
  font-size: 10px;
215
+ margin-left: 2px;
216
+ }
217
+ button {
218
+ font-size: 10px;
179
219
  }
180
220
  }
181
221
  }
@@ -1,4 +1,4 @@
1
- // OverlayMe v0.12.1
1
+ // OverlayMe v0.13.0
2
2
  // http://github.com/frontfoot/overlay_me
3
3
  //
4
4
  // Copyright (c) 2012 Joseph Boiteau, FrontFoot Media Solutions
@@ -623,18 +623,28 @@ if(elem.nodeType===9){doc=elem.documentElement;if(doc[clientProp]>=doc[scrollPro
623
623
  return Math.max(elem.body[scrollProp],doc[scrollProp],elem.body[offsetProp],doc[offsetProp]);}
624
624
  if(value===undefined){orig=OMjQuery.css(elem,type);ret=parseFloat(orig);return OMjQuery.isNumeric(ret)?ret:orig;}
625
625
  OMjQuery(elem).css(type,value);},type,value,arguments.length,null);};});window.OMjQuery=window.$o=OMjQuery;if(typeof define==="function"&&define.amd&&define.amd.OMjQuery){define("jquery",[],function(){return OMjQuery;});}})(window);(function(){var root=this;var previousUnderscore=root._;var breaker={};var ArrayProto=Array.prototype,ObjProto=Object.prototype,FuncProto=Function.prototype;var slice=ArrayProto.slice,unshift=ArrayProto.unshift,toString=ObjProto.toString,hasOwnProperty=ObjProto.hasOwnProperty;var
626
- nativeForEach=ArrayProto.forEach,nativeMap=ArrayProto.map,nativeReduce=ArrayProto.reduce,nativeReduceRight=ArrayProto.reduceRight,nativeFilter=ArrayProto.filter,nativeEvery=ArrayProto.every,nativeSome=ArrayProto.some,nativeIndexOf=ArrayProto.indexOf,nativeLastIndexOf=ArrayProto.lastIndexOf,nativeIsArray=Array.isArray,nativeKeys=Object.keys,nativeBind=FuncProto.bind;var _=function(obj){return new wrapper(obj);};if(typeof module!=='undefined'&&module.exports){module.exports=_;_._=_;}else{root._=_;}
627
- _.VERSION='1.1.6';var each=_.each=_.forEach=function(obj,iterator,context){if(obj==null)return;if(nativeForEach&&obj.forEach===nativeForEach){obj.forEach(iterator,context);}else if(_.isNumber(obj.length)){for(var i=0,l=obj.length;i<l;i++){if(iterator.call(context,obj[i],i,obj)===breaker)return;}}else{for(var key in obj){if(hasOwnProperty.call(obj,key)){if(iterator.call(context,obj[key],key,obj)===breaker)return;}}}};_.map=function(obj,iterator,context){var results=[];if(obj==null)return results;if(nativeMap&&obj.map===nativeMap)return obj.map(iterator,context);each(obj,function(value,index,list){results[results.length]=iterator.call(context,value,index,list);});return results;};_.reduce=_.foldl=_.inject=function(obj,iterator,memo,context){var initial=memo!==void 0;if(obj==null)obj=[];if(nativeReduce&&obj.reduce===nativeReduce){if(context)iterator=_.bind(iterator,context);return initial?obj.reduce(iterator,memo):obj.reduce(iterator);}
628
- each(obj,function(value,index,list){if(!initial&&index===0){memo=value;initial=true;}else{memo=iterator.call(context,memo,value,index,list);}});if(!initial)throw new TypeError("Reduce of empty array with no initial value");return memo;};_.reduceRight=_.foldr=function(obj,iterator,memo,context){if(obj==null)obj=[];if(nativeReduceRight&&obj.reduceRight===nativeReduceRight){if(context)iterator=_.bind(iterator,context);return memo!==void 0?obj.reduceRight(iterator,memo):obj.reduceRight(iterator);}
629
- var reversed=(_.isArray(obj)?obj.slice():_.toArray(obj)).reverse();return _.reduce(reversed,iterator,memo,context);};_.find=_.detect=function(obj,iterator,context){var result;any(obj,function(value,index,list){if(iterator.call(context,value,index,list)){result=value;return true;}});return result;};_.filter=_.select=function(obj,iterator,context){var results=[];if(obj==null)return results;if(nativeFilter&&obj.filter===nativeFilter)return obj.filter(iterator,context);each(obj,function(value,index,list){if(iterator.call(context,value,index,list))results[results.length]=value;});return results;};_.reject=function(obj,iterator,context){var results=[];if(obj==null)return results;each(obj,function(value,index,list){if(!iterator.call(context,value,index,list))results[results.length]=value;});return results;};_.every=_.all=function(obj,iterator,context){var result=true;if(obj==null)return result;if(nativeEvery&&obj.every===nativeEvery)return obj.every(iterator,context);each(obj,function(value,index,list){if(!(result=result&&iterator.call(context,value,index,list)))return breaker;});return result;};var any=_.some=_.any=function(obj,iterator,context){iterator||(iterator=_.identity);var result=false;if(obj==null)return result;if(nativeSome&&obj.some===nativeSome)return obj.some(iterator,context);each(obj,function(value,index,list){if(result=iterator.call(context,value,index,list))return breaker;});return result;};_.include=_.contains=function(obj,target){var found=false;if(obj==null)return found;if(nativeIndexOf&&obj.indexOf===nativeIndexOf)return obj.indexOf(target)!=-1;any(obj,function(value){if(found=value===target)return true;});return found;};_.invoke=function(obj,method){var args=slice.call(arguments,2);return _.map(obj,function(value){return(method.call?method||value:value[method]).apply(value,args);});};_.pluck=function(obj,key){return _.map(obj,function(value){return value[key];});};_.max=function(obj,iterator,context){if(!iterator&&_.isArray(obj))return Math.max.apply(Math,obj);var result={computed:-Infinity};each(obj,function(value,index,list){var computed=iterator?iterator.call(context,value,index,list):value;computed>=result.computed&&(result={value:value,computed:computed});});return result.value;};_.min=function(obj,iterator,context){if(!iterator&&_.isArray(obj))return Math.min.apply(Math,obj);var result={computed:Infinity};each(obj,function(value,index,list){var computed=iterator?iterator.call(context,value,index,list):value;computed<result.computed&&(result={value:value,computed:computed});});return result.value;};_.sortBy=function(obj,iterator,context){return _.pluck(_.map(obj,function(value,index,list){return{value:value,criteria:iterator.call(context,value,index,list)};}).sort(function(left,right){var a=left.criteria,b=right.criteria;return a<b?-1:a>b?1:0;}),'value');};_.sortedIndex=function(array,obj,iterator){iterator||(iterator=_.identity);var low=0,high=array.length;while(low<high){var mid=(low+high)>>1;iterator(array[mid])<iterator(obj)?low=mid+1:high=mid;}
630
- return low;};_.toArray=function(iterable){if(!iterable)return[];if(iterable.toArray)return iterable.toArray();if(_.isArray(iterable))return iterable;if(_.isArguments(iterable))return slice.call(iterable);return _.values(iterable);};_.size=function(obj){return _.toArray(obj).length;};_.first=_.head=function(array,n,guard){return(n!=null)&&!guard?slice.call(array,0,n):array[0];};_.rest=_.tail=function(array,index,guard){return slice.call(array,(index==null)||guard?1:index);};_.last=function(array){return array[array.length-1];};_.compact=function(array){return _.filter(array,function(value){return!!value;});};_.flatten=function(array){return _.reduce(array,function(memo,value){if(_.isArray(value))return memo.concat(_.flatten(value));memo[memo.length]=value;return memo;},[]);};_.without=function(array){var values=slice.call(arguments,1);return _.filter(array,function(value){return!_.include(values,value);});};_.uniq=_.unique=function(array,isSorted){return _.reduce(array,function(memo,el,i){if(0==i||(isSorted===true?_.last(memo)!=el:!_.include(memo,el)))memo[memo.length]=el;return memo;},[]);};_.intersect=function(array){var rest=slice.call(arguments,1);return _.filter(_.uniq(array),function(item){return _.every(rest,function(other){return _.indexOf(other,item)>=0;});});};_.zip=function(){var args=slice.call(arguments);var length=_.max(_.pluck(args,'length'));var results=new Array(length);for(var i=0;i<length;i++)results[i]=_.pluck(args,""+i);return results;};_.indexOf=function(array,item,isSorted){if(array==null)return-1;var i,l;if(isSorted){i=_.sortedIndex(array,item);return array[i]===item?i:-1;}
631
- if(nativeIndexOf&&array.indexOf===nativeIndexOf)return array.indexOf(item);for(i=0,l=array.length;i<l;i++)if(array[i]===item)return i;return-1;};_.lastIndexOf=function(array,item){if(array==null)return-1;if(nativeLastIndexOf&&array.lastIndexOf===nativeLastIndexOf)return array.lastIndexOf(item);var i=array.length;while(i--)if(array[i]===item)return i;return-1;};_.range=function(start,stop,step){if(arguments.length<=1){stop=start||0;start=0;}
626
+ nativeForEach=ArrayProto.forEach,nativeMap=ArrayProto.map,nativeReduce=ArrayProto.reduce,nativeReduceRight=ArrayProto.reduceRight,nativeFilter=ArrayProto.filter,nativeEvery=ArrayProto.every,nativeSome=ArrayProto.some,nativeIndexOf=ArrayProto.indexOf,nativeLastIndexOf=ArrayProto.lastIndexOf,nativeIsArray=Array.isArray,nativeKeys=Object.keys,nativeBind=FuncProto.bind;var _=function(obj){return new wrapper(obj);};if(typeof exports!=='undefined'){if(typeof module!=='undefined'&&module.exports){exports=module.exports=_;}
627
+ exports._=_;}else{root['_']=_;}
628
+ _.VERSION='1.3.3';var each=_.each=_.forEach=function(obj,iterator,context){if(obj==null)return;if(nativeForEach&&obj.forEach===nativeForEach){obj.forEach(iterator,context);}else if(obj.length===+obj.length){for(var i=0,l=obj.length;i<l;i++){if(i in obj&&iterator.call(context,obj[i],i,obj)===breaker)return;}}else{for(var key in obj){if(_.has(obj,key)){if(iterator.call(context,obj[key],key,obj)===breaker)return;}}}};_.map=_.collect=function(obj,iterator,context){var results=[];if(obj==null)return results;if(nativeMap&&obj.map===nativeMap)return obj.map(iterator,context);each(obj,function(value,index,list){results[results.length]=iterator.call(context,value,index,list);});if(obj.length===+obj.length)results.length=obj.length;return results;};_.reduce=_.foldl=_.inject=function(obj,iterator,memo,context){var initial=arguments.length>2;if(obj==null)obj=[];if(nativeReduce&&obj.reduce===nativeReduce){if(context)iterator=_.bind(iterator,context);return initial?obj.reduce(iterator,memo):obj.reduce(iterator);}
629
+ each(obj,function(value,index,list){if(!initial){memo=value;initial=true;}else{memo=iterator.call(context,memo,value,index,list);}});if(!initial)throw new TypeError('Reduce of empty array with no initial value');return memo;};_.reduceRight=_.foldr=function(obj,iterator,memo,context){var initial=arguments.length>2;if(obj==null)obj=[];if(nativeReduceRight&&obj.reduceRight===nativeReduceRight){if(context)iterator=_.bind(iterator,context);return initial?obj.reduceRight(iterator,memo):obj.reduceRight(iterator);}
630
+ var reversed=_.toArray(obj).reverse();if(context&&!initial)iterator=_.bind(iterator,context);return initial?_.reduce(reversed,iterator,memo,context):_.reduce(reversed,iterator);};_.find=_.detect=function(obj,iterator,context){var result;any(obj,function(value,index,list){if(iterator.call(context,value,index,list)){result=value;return true;}});return result;};_.filter=_.select=function(obj,iterator,context){var results=[];if(obj==null)return results;if(nativeFilter&&obj.filter===nativeFilter)return obj.filter(iterator,context);each(obj,function(value,index,list){if(iterator.call(context,value,index,list))results[results.length]=value;});return results;};_.reject=function(obj,iterator,context){var results=[];if(obj==null)return results;each(obj,function(value,index,list){if(!iterator.call(context,value,index,list))results[results.length]=value;});return results;};_.every=_.all=function(obj,iterator,context){var result=true;if(obj==null)return result;if(nativeEvery&&obj.every===nativeEvery)return obj.every(iterator,context);each(obj,function(value,index,list){if(!(result=result&&iterator.call(context,value,index,list)))return breaker;});return!!result;};var any=_.some=_.any=function(obj,iterator,context){iterator||(iterator=_.identity);var result=false;if(obj==null)return result;if(nativeSome&&obj.some===nativeSome)return obj.some(iterator,context);each(obj,function(value,index,list){if(result||(result=iterator.call(context,value,index,list)))return breaker;});return!!result;};_.include=_.contains=function(obj,target){var found=false;if(obj==null)return found;if(nativeIndexOf&&obj.indexOf===nativeIndexOf)return obj.indexOf(target)!=-1;found=any(obj,function(value){return value===target;});return found;};_.invoke=function(obj,method){var args=slice.call(arguments,2);return _.map(obj,function(value){return(_.isFunction(method)?method||value:value[method]).apply(value,args);});};_.pluck=function(obj,key){return _.map(obj,function(value){return value[key];});};_.max=function(obj,iterator,context){if(!iterator&&_.isArray(obj)&&obj[0]===+obj[0])return Math.max.apply(Math,obj);if(!iterator&&_.isEmpty(obj))return-Infinity;var result={computed:-Infinity};each(obj,function(value,index,list){var computed=iterator?iterator.call(context,value,index,list):value;computed>=result.computed&&(result={value:value,computed:computed});});return result.value;};_.min=function(obj,iterator,context){if(!iterator&&_.isArray(obj)&&obj[0]===+obj[0])return Math.min.apply(Math,obj);if(!iterator&&_.isEmpty(obj))return Infinity;var result={computed:Infinity};each(obj,function(value,index,list){var computed=iterator?iterator.call(context,value,index,list):value;computed<result.computed&&(result={value:value,computed:computed});});return result.value;};_.shuffle=function(obj){var shuffled=[],rand;each(obj,function(value,index,list){rand=Math.floor(Math.random()*(index+1));shuffled[index]=shuffled[rand];shuffled[rand]=value;});return shuffled;};_.sortBy=function(obj,val,context){var iterator=_.isFunction(val)?val:function(obj){return obj[val];};return _.pluck(_.map(obj,function(value,index,list){return{value:value,criteria:iterator.call(context,value,index,list)};}).sort(function(left,right){var a=left.criteria,b=right.criteria;if(a===void 0)return 1;if(b===void 0)return-1;return a<b?-1:a>b?1:0;}),'value');};_.groupBy=function(obj,val){var result={};var iterator=_.isFunction(val)?val:function(obj){return obj[val];};each(obj,function(value,index){var key=iterator(value,index);(result[key]||(result[key]=[])).push(value);});return result;};_.sortedIndex=function(array,obj,iterator){iterator||(iterator=_.identity);var low=0,high=array.length;while(low<high){var mid=(low+high)>>1;iterator(array[mid])<iterator(obj)?low=mid+1:high=mid;}
631
+ return low;};_.toArray=function(obj){if(!obj)return[];if(_.isArray(obj))return slice.call(obj);if(_.isArguments(obj))return slice.call(obj);if(obj.toArray&&_.isFunction(obj.toArray))return obj.toArray();return _.values(obj);};_.size=function(obj){return _.isArray(obj)?obj.length:_.keys(obj).length;};_.first=_.head=_.take=function(array,n,guard){return(n!=null)&&!guard?slice.call(array,0,n):array[0];};_.initial=function(array,n,guard){return slice.call(array,0,array.length-((n==null)||guard?1:n));};_.last=function(array,n,guard){if((n!=null)&&!guard){return slice.call(array,Math.max(array.length-n,0));}else{return array[array.length-1];}};_.rest=_.tail=function(array,index,guard){return slice.call(array,(index==null)||guard?1:index);};_.compact=function(array){return _.filter(array,function(value){return!!value;});};_.flatten=function(array,shallow){return _.reduce(array,function(memo,value){if(_.isArray(value))return memo.concat(shallow?value:_.flatten(value));memo[memo.length]=value;return memo;},[]);};_.without=function(array){return _.difference(array,slice.call(arguments,1));};_.uniq=_.unique=function(array,isSorted,iterator){var initial=iterator?_.map(array,iterator):array;var results=[];if(array.length<3)isSorted=true;_.reduce(initial,function(memo,value,index){if(isSorted?_.last(memo)!==value||!memo.length:!_.include(memo,value)){memo.push(value);results.push(array[index]);}
632
+ return memo;},[]);return results;};_.union=function(){return _.uniq(_.flatten(arguments,true));};_.intersection=_.intersect=function(array){var rest=slice.call(arguments,1);return _.filter(_.uniq(array),function(item){return _.every(rest,function(other){return _.indexOf(other,item)>=0;});});};_.difference=function(array){var rest=_.flatten(slice.call(arguments,1),true);return _.filter(array,function(value){return!_.include(rest,value);});};_.zip=function(){var args=slice.call(arguments);var length=_.max(_.pluck(args,'length'));var results=new Array(length);for(var i=0;i<length;i++)results[i]=_.pluck(args,""+i);return results;};_.indexOf=function(array,item,isSorted){if(array==null)return-1;var i,l;if(isSorted){i=_.sortedIndex(array,item);return array[i]===item?i:-1;}
633
+ if(nativeIndexOf&&array.indexOf===nativeIndexOf)return array.indexOf(item);for(i=0,l=array.length;i<l;i++)if(i in array&&array[i]===item)return i;return-1;};_.lastIndexOf=function(array,item){if(array==null)return-1;if(nativeLastIndexOf&&array.lastIndexOf===nativeLastIndexOf)return array.lastIndexOf(item);var i=array.length;while(i--)if(i in array&&array[i]===item)return i;return-1;};_.range=function(start,stop,step){if(arguments.length<=1){stop=start||0;start=0;}
632
634
  step=arguments[2]||1;var len=Math.max(Math.ceil((stop-start)/step),0);var idx=0;var range=new Array(len);while(idx<len){range[idx++]=start;start+=step;}
633
- return range;};_.bind=function(func,obj){if(func.bind===nativeBind&&nativeBind)return nativeBind.apply(func,slice.call(arguments,1));var args=slice.call(arguments,2);return function(){return func.apply(obj,args.concat(slice.call(arguments)));};};_.bindAll=function(obj){var funcs=slice.call(arguments,1);if(funcs.length==0)funcs=_.functions(obj);each(funcs,function(f){obj[f]=_.bind(obj[f],obj);});return obj;};_.memoize=function(func,hasher){var memo={};hasher||(hasher=_.identity);return function(){var key=hasher.apply(this,arguments);return hasOwnProperty.call(memo,key)?memo[key]:(memo[key]=func.apply(this,arguments));};};_.delay=function(func,wait){var args=slice.call(arguments,2);return setTimeout(function(){return func.apply(func,args);},wait);};_.defer=function(func){return _.delay.apply(_,[func,1].concat(slice.call(arguments,1)));};var limit=function(func,wait,debounce){var timeout;return function(){var context=this,args=arguments;var throttler=function(){timeout=null;func.apply(context,args);};if(debounce)clearTimeout(timeout);if(debounce||!timeout)timeout=setTimeout(throttler,wait);};};_.throttle=function(func,wait){return limit(func,wait,false);};_.debounce=function(func,wait){return limit(func,wait,true);};_.once=function(func){var ran=false,memo;return function(){if(ran)return memo;ran=true;return memo=func.apply(this,arguments);};};_.wrap=function(func,wrapper){return function(){var args=[func].concat(slice.call(arguments));return wrapper.apply(this,args);};};_.compose=function(){var funcs=slice.call(arguments);return function(){var args=slice.call(arguments);for(var i=funcs.length-1;i>=0;i--){args=[funcs[i].apply(this,args)];}
634
- return args[0];};};_.after=function(times,func){return function(){if(--times<1){return func.apply(this,arguments);}};};_.keys=nativeKeys||function(obj){if(obj!==Object(obj))throw new TypeError('Invalid object');var keys=[];for(var key in obj)if(hasOwnProperty.call(obj,key))keys[keys.length]=key;return keys;};_.values=function(obj){return _.map(obj,_.identity);};_.functions=_.methods=function(obj){return _.filter(_.keys(obj),function(key){return _.isFunction(obj[key]);}).sort();};_.extend=function(obj){each(slice.call(arguments,1),function(source){for(var prop in source){if(source[prop]!==void 0)obj[prop]=source[prop];}});return obj;};_.defaults=function(obj){each(slice.call(arguments,1),function(source){for(var prop in source){if(obj[prop]==null)obj[prop]=source[prop];}});return obj;};_.clone=function(obj){return _.isArray(obj)?obj.slice():_.extend({},obj);};_.tap=function(obj,interceptor){interceptor(obj);return obj;};_.isEqual=function(a,b){if(a===b)return true;var atype=typeof(a),btype=typeof(b);if(atype!=btype)return false;if(a==b)return true;if((!a&&b)||(a&&!b))return false;if(a._chain)a=a._wrapped;if(b._chain)b=b._wrapped;if(a.isEqual)return a.isEqual(b);if(_.isDate(a)&&_.isDate(b))return a.getTime()===b.getTime();if(_.isNaN(a)&&_.isNaN(b))return false;if(_.isRegExp(a)&&_.isRegExp(b))
635
- return a.source===b.source&&a.global===b.global&&a.ignoreCase===b.ignoreCase&&a.multiline===b.multiline;if(atype!=='object')return false;if(a.length&&(a.length!==b.length))return false;var aKeys=_.keys(a),bKeys=_.keys(b);if(aKeys.length!=bKeys.length)return false;for(var key in a)if(!(key in b)||!_.isEqual(a[key],b[key]))return false;return true;};_.isEmpty=function(obj){if(_.isArray(obj)||_.isString(obj))return obj.length===0;for(var key in obj)if(hasOwnProperty.call(obj,key))return false;return true;};_.isElement=function(obj){return!!(obj&&obj.nodeType==1);};_.isArray=nativeIsArray||function(obj){return toString.call(obj)==='[object Array]';};_.isArguments=function(obj){return!!(obj&&hasOwnProperty.call(obj,'callee'));};_.isFunction=function(obj){return!!(obj&&obj.constructor&&obj.call&&obj.apply);};_.isString=function(obj){return!!(obj===''||(obj&&obj.charCodeAt&&obj.substr));};_.isNumber=function(obj){return!!(obj===0||(obj&&obj.toExponential&&obj.toFixed));};_.isNaN=function(obj){return obj!==obj;};_.isBoolean=function(obj){return obj===true||obj===false;};_.isDate=function(obj){return!!(obj&&obj.getTimezoneOffset&&obj.setUTCFullYear);};_.isRegExp=function(obj){return!!(obj&&obj.test&&obj.exec&&(obj.ignoreCase||obj.ignoreCase===false));};_.isNull=function(obj){return obj===null;};_.isUndefined=function(obj){return obj===void 0;};_.noConflict=function(){root._=previousUnderscore;return this;};_.identity=function(value){return value;};_.times=function(n,iterator,context){for(var i=0;i<n;i++)iterator.call(context,i);};_.mixin=function(obj){each(_.functions(obj),function(name){addToWrapper(name,_[name]=obj[name]);});};var idCounter=0;_.uniqueId=function(prefix){var id=idCounter++;return prefix?prefix+id:id;};_.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g};_.template=function(str,data){var c=_.templateSettings;var tmpl='var __p=[],print=function(){__p.push.apply(__p,arguments);};'+'with(obj||{}){__p.push(\''+
636
- str.replace(/\\/g,'\\\\').replace(/'/g,"\\'").replace(c.interpolate,function(match,code){return"',"+code.replace(/\\'/g,"'")+",'";}).replace(c.evaluate||null,function(match,code){return"');"+code.replace(/\\'/g,"'").replace(/[\r\n\t]/g,' ')+"__p.push('";}).replace(/\r/g,'\\r').replace(/\n/g,'\\n').replace(/\t/g,'\\t')
637
- +"');}return __p.join('');";var func=new Function('obj',tmpl);return data?func(data):func;};var wrapper=function(obj){this._wrapped=obj;};_.prototype=wrapper.prototype;var result=function(obj,chain){return chain?_(obj).chain():obj;};var addToWrapper=function(name,func){wrapper.prototype[name]=function(){var args=slice.call(arguments);unshift.call(args,this._wrapped);return result(func.apply(_,args),this._chain);};};_.mixin(_);each(['pop','push','reverse','shift','sort','splice','unshift'],function(name){var method=ArrayProto[name];wrapper.prototype[name]=function(){method.apply(this._wrapped,arguments);return result(this._wrapped,this._chain);};});each(['concat','join','slice'],function(name){var method=ArrayProto[name];wrapper.prototype[name]=function(){return result(method.apply(this._wrapped,arguments),this._chain);};});wrapper.prototype.chain=function(){this._chain=true;return this;};wrapper.prototype.value=function(){return this._wrapped;};})();(function(){var root=this;var previousBackbone=root.Backbone;var Backbone;if(typeof exports!=='undefined'){Backbone=exports;}else{Backbone=root.Backbone={};}
635
+ return range;};var ctor=function(){};_.bind=function bind(func,context){var bound,args;if(func.bind===nativeBind&&nativeBind)return nativeBind.apply(func,slice.call(arguments,1));if(!_.isFunction(func))throw new TypeError;args=slice.call(arguments,2);return bound=function(){if(!(this instanceof bound))return func.apply(context,args.concat(slice.call(arguments)));ctor.prototype=func.prototype;var self=new ctor;var result=func.apply(self,args.concat(slice.call(arguments)));if(Object(result)===result)return result;return self;};};_.bindAll=function(obj){var funcs=slice.call(arguments,1);if(funcs.length==0)funcs=_.functions(obj);each(funcs,function(f){obj[f]=_.bind(obj[f],obj);});return obj;};_.memoize=function(func,hasher){var memo={};hasher||(hasher=_.identity);return function(){var key=hasher.apply(this,arguments);return _.has(memo,key)?memo[key]:(memo[key]=func.apply(this,arguments));};};_.delay=function(func,wait){var args=slice.call(arguments,2);return setTimeout(function(){return func.apply(null,args);},wait);};_.defer=function(func){return _.delay.apply(_,[func,1].concat(slice.call(arguments,1)));};_.throttle=function(func,wait){var context,args,timeout,throttling,more,result;var whenDone=_.debounce(function(){more=throttling=false;},wait);return function(){context=this;args=arguments;var later=function(){timeout=null;if(more)func.apply(context,args);whenDone();};if(!timeout)timeout=setTimeout(later,wait);if(throttling){more=true;}else{result=func.apply(context,args);}
636
+ whenDone();throttling=true;return result;};};_.debounce=function(func,wait,immediate){var timeout;return function(){var context=this,args=arguments;var later=function(){timeout=null;if(!immediate)func.apply(context,args);};if(immediate&&!timeout)func.apply(context,args);clearTimeout(timeout);timeout=setTimeout(later,wait);};};_.once=function(func){var ran=false,memo;return function(){if(ran)return memo;ran=true;return memo=func.apply(this,arguments);};};_.wrap=function(func,wrapper){return function(){var args=[func].concat(slice.call(arguments,0));return wrapper.apply(this,args);};};_.compose=function(){var funcs=arguments;return function(){var args=arguments;for(var i=funcs.length-1;i>=0;i--){args=[funcs[i].apply(this,args)];}
637
+ return args[0];};};_.after=function(times,func){if(times<=0)return func();return function(){if(--times<1){return func.apply(this,arguments);}};};_.keys=nativeKeys||function(obj){if(obj!==Object(obj))throw new TypeError('Invalid object');var keys=[];for(var key in obj)if(_.has(obj,key))keys[keys.length]=key;return keys;};_.values=function(obj){return _.map(obj,_.identity);};_.functions=_.methods=function(obj){var names=[];for(var key in obj){if(_.isFunction(obj[key]))names.push(key);}
638
+ return names.sort();};_.extend=function(obj){each(slice.call(arguments,1),function(source){for(var prop in source){obj[prop]=source[prop];}});return obj;};_.pick=function(obj){var result={};each(_.flatten(slice.call(arguments,1)),function(key){if(key in obj)result[key]=obj[key];});return result;};_.defaults=function(obj){each(slice.call(arguments,1),function(source){for(var prop in source){if(obj[prop]==null)obj[prop]=source[prop];}});return obj;};_.clone=function(obj){if(!_.isObject(obj))return obj;return _.isArray(obj)?obj.slice():_.extend({},obj);};_.tap=function(obj,interceptor){interceptor(obj);return obj;};function eq(a,b,stack){if(a===b)return a!==0||1/a==1/b;if(a==null||b==null)return a===b;if(a._chain)a=a._wrapped;if(b._chain)b=b._wrapped;if(a.isEqual&&_.isFunction(a.isEqual))return a.isEqual(b);if(b.isEqual&&_.isFunction(b.isEqual))return b.isEqual(a);var className=toString.call(a);if(className!=toString.call(b))return false;switch(className){case'[object String]':return a==String(b);case'[object Number]':return a!=+a?b!=+b:(a==0?1/a==1/b:a==+b);case'[object Date]':case'[object Boolean]':return+a==+b;case'[object RegExp]':return a.source==b.source&&a.global==b.global&&a.multiline==b.multiline&&a.ignoreCase==b.ignoreCase;}
639
+ if(typeof a!='object'||typeof b!='object')return false;var length=stack.length;while(length--){if(stack[length]==a)return true;}
640
+ stack.push(a);var size=0,result=true;if(className=='[object Array]'){size=a.length;result=size==b.length;if(result){while(size--){if(!(result=size in a==size in b&&eq(a[size],b[size],stack)))break;}}}else{if('constructor'in a!='constructor'in b||a.constructor!=b.constructor)return false;for(var key in a){if(_.has(a,key)){size++;if(!(result=_.has(b,key)&&eq(a[key],b[key],stack)))break;}}
641
+ if(result){for(key in b){if(_.has(b,key)&&!(size--))break;}
642
+ result=!size;}}
643
+ stack.pop();return result;}
644
+ _.isEqual=function(a,b){return eq(a,b,[]);};_.isEmpty=function(obj){if(obj==null)return true;if(_.isArray(obj)||_.isString(obj))return obj.length===0;for(var key in obj)if(_.has(obj,key))return false;return true;};_.isElement=function(obj){return!!(obj&&obj.nodeType==1);};_.isArray=nativeIsArray||function(obj){return toString.call(obj)=='[object Array]';};_.isObject=function(obj){return obj===Object(obj);};_.isArguments=function(obj){return toString.call(obj)=='[object Arguments]';};if(!_.isArguments(arguments)){_.isArguments=function(obj){return!!(obj&&_.has(obj,'callee'));};}
645
+ _.isFunction=function(obj){return toString.call(obj)=='[object Function]';};_.isString=function(obj){return toString.call(obj)=='[object String]';};_.isNumber=function(obj){return toString.call(obj)=='[object Number]';};_.isFinite=function(obj){return _.isNumber(obj)&&isFinite(obj);};_.isNaN=function(obj){return obj!==obj;};_.isBoolean=function(obj){return obj===true||obj===false||toString.call(obj)=='[object Boolean]';};_.isDate=function(obj){return toString.call(obj)=='[object Date]';};_.isRegExp=function(obj){return toString.call(obj)=='[object RegExp]';};_.isNull=function(obj){return obj===null;};_.isUndefined=function(obj){return obj===void 0;};_.has=function(obj,key){return hasOwnProperty.call(obj,key);};_.noConflict=function(){root._=previousUnderscore;return this;};_.identity=function(value){return value;};_.times=function(n,iterator,context){for(var i=0;i<n;i++)iterator.call(context,i);};_.escape=function(string){return(''+string).replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;').replace(/'/g,'&#x27;').replace(/\//g,'&#x2F;');};_.result=function(object,property){if(object==null)return null;var value=object[property];return _.isFunction(value)?value.call(object):value;};_.mixin=function(obj){each(_.functions(obj),function(name){addToWrapper(name,_[name]=obj[name]);});};var idCounter=0;_.uniqueId=function(prefix){var id=idCounter++;return prefix?prefix+id:id;};_.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var noMatch=/.^/;var escapes={'\\':'\\',"'":"'",'r':'\r','n':'\n','t':'\t','u2028':'\u2028','u2029':'\u2029'};for(var p in escapes)escapes[escapes[p]]=p;var escaper=/\\|'|\r|\n|\t|\u2028|\u2029/g;var unescaper=/\\(\\|'|r|n|t|u2028|u2029)/g;var unescape=function(code){return code.replace(unescaper,function(match,escape){return escapes[escape];});};_.template=function(text,data,settings){settings=_.defaults(settings||{},_.templateSettings);var source="__p+='"+text.replace(escaper,function(match){return'\\'+escapes[match];}).replace(settings.escape||noMatch,function(match,code){return"'+\n_.escape("+unescape(code)+")+\n'";}).replace(settings.interpolate||noMatch,function(match,code){return"'+\n("+unescape(code)+")+\n'";}).replace(settings.evaluate||noMatch,function(match,code){return"';\n"+unescape(code)+"\n;__p+='";})+"';\n";if(!settings.variable)source='with(obj||{}){\n'+source+'}\n';source="var __p='';"+"var print=function(){__p+=Array.prototype.join.call(arguments, '')};\n"+
646
+ source+"return __p;\n";var render=new Function(settings.variable||'obj','_',source);if(data)return render(data,_);var template=function(data){return render.call(this,data,_);};template.source='function('+(settings.variable||'obj')+'){\n'+
647
+ source+'}';return template;};_.chain=function(obj){return _(obj).chain();};var wrapper=function(obj){this._wrapped=obj;};_.prototype=wrapper.prototype;var result=function(obj,chain){return chain?_(obj).chain():obj;};var addToWrapper=function(name,func){wrapper.prototype[name]=function(){var args=slice.call(arguments);unshift.call(args,this._wrapped);return result(func.apply(_,args),this._chain);};};_.mixin(_);each(['pop','push','reverse','shift','sort','splice','unshift'],function(name){var method=ArrayProto[name];wrapper.prototype[name]=function(){var wrapped=this._wrapped;method.apply(wrapped,arguments);var length=wrapped.length;if((name=='shift'||name=='splice')&&length===0)delete wrapped[0];return result(wrapped,this._chain);};});each(['concat','join','slice'],function(name){var method=ArrayProto[name];wrapper.prototype[name]=function(){return result(method.apply(this._wrapped,arguments),this._chain);};});wrapper.prototype.chain=function(){this._chain=true;return this;};wrapper.prototype.value=function(){return this._wrapped;};}).call(this);(function(){var root=this;var previousBackbone=root.Backbone;var Backbone;if(typeof exports!=='undefined'){Backbone=exports;}else{Backbone=root.Backbone={};}
638
648
  Backbone.VERSION='0.5.2';var _=root._;if(!_&&(typeof require!=='undefined'))_=require('underscore')._;var $=root.jQuery||root.Zepto;Backbone.noConflict=function(){root.Backbone=previousBackbone;return this;};Backbone.emulateHTTP=false;Backbone.emulateJSON=false;Backbone.Events={bind:function(ev,callback,context){var calls=this._callbacks||(this._callbacks={});var list=calls[ev]||(calls[ev]=[]);list.push([callback,context]);return this;},unbind:function(ev,callback){var calls;if(!ev){this._callbacks={};}else if(calls=this._callbacks){if(!callback){calls[ev]=[];}else{var list=calls[ev];if(!list)return this;for(var i=0,l=list.length;i<l;i++){if(list[i]&&callback===list[i][0]){list[i]=null;break;}}}}
639
649
  return this;},trigger:function(eventName){var list,calls,ev,callback,args;var both=2;if(!(calls=this._callbacks))return this;while(both--){ev=both?eventName:'all';if(list=calls[ev]){for(var i=0,l=list.length;i<l;i++){if(!(callback=list[i])){list.splice(i,1);i--;l--;}else{args=both?Array.prototype.slice.call(arguments,1):arguments;callback[0].apply(callback[1]||this,args);}}}}
640
650
  return this;}};Backbone.Model=function(attributes,options){var defaults;attributes||(attributes={});if(defaults=this.defaults){if(_.isFunction(defaults))defaults=defaults.call(this);attributes=_.extend({},defaults,attributes);}
@@ -702,30 +712,38 @@ function draw(attrsModified){calc();if(isChanged&&value!=prevValue)
702
712
  slider.dispatchEvent(onChange);isChanged=false;if(!attrsModified&&value==prevValue)
703
713
  return;prevValue=value;var position=range?(value-min)/range*100:0;var bg='-moz-element(#__sliderthumb__) '+position+'% no-repeat, ';style(slider,{background:bg+track});}}
704
714
  function style(element,styles){for(var prop in styles)
705
- element.style.setProperty(prop,styles[prop],'important');}})();(function(){$o('head').append('<style rel="stylesheet" type="text/css">button{font-size:9px;margin:0 3px;padding:0 3px}#overlay_me_page_container{position:relative}#overlay_me_menu{position:fixed;right:0;z-index:990}#overlay_me_menu *{line-height:14px}#overlay_me_menu .drag-me{line-height:100%;display:block;color:black;font-size:.7em;text-align:center;background-image:-webkit-gradient(linear,0deg,0deg,color-stop(0%,#999),color-stop(30%,#ddd),color-stop(70%,#ddd),color-stop(100%,#999));background-image:-webkit-linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);background-image:-moz-linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);background-image:-o-linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);background-image:-ms-linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);background-image:linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);padding:1px}#overlay_me_menu .drag-me:hover{cursor:move}#overlay_me_menu ul{list-style:none;margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}.menu-item{text-align:left;background-color:#CCC;border:1px solid rgba(255,255,255,0.2);width:200px}.menu-item a.collaps-button{cursor:pointer;position:absolute;padding-top:9px;padding-left:5px;width:13px;height:9px;border:none;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAJCAYAAADpeqZqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIlJREFUeNpivHDhQujz589TmZiYvjMQAP/+/eOQkZGZyfD//38ZIL77nzhwG4ilQJpA2BiIPxHQ8BGIDUHqYZpAOIWApiSYWmRNIDfPxaYaKD4bWR2KJiDmA+KzaHrOQMVxagJhfSD+ALXhA5TPQEgTCCcD8V+gpmRs8rg0MQI1eANpJmzyAAEGAKD/bax/HrzbAAAAAElFTkSuQmCC) no-repeat center 3px}.menu-item a.collaps-button span{display:none;color:yellow}.menu-item a.collaps-button span:hover{color:yellow}.menu-item label.title{padding-left:20px;color:white;cursor:pointer;width:187px;line-height:1.1em;font-size:14px;background:none}.menu-item.collapsed .item-content{display:none}.menu-item.collapsed a.collaps-button{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANCAYAAAB7AEQGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAKtJREFUeNpiuHz5ctD///+lgJgBF2Z68uRJOgMDw0EgNmTAAZiA4AeQVgHiA0CchFUREpsPiOcCjZ8NZWNVBAaMjIwpQGofEOvjVAQFxkATDwJxMkgNCy7HAk3kB1KzgApf4DIJBD4CcRpQ8TZcJp2D+vQiVjcBjZ8HpBxhCtAVfQbiVKDxIMd+QtbI8u/fP04gfQ+Iw4D4LDa7WSQlJUGBdxyIn+DyAUCAAQDxsEXD9kreLQAAAABJRU5ErkJggg==) no-repeat center top}#overlay_panel .content-mgnt-block{position:relative;line-height:10px}#overlay_panel .content-mgnt-block .unicorns{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAklJREFUeNqEks1u00AQx3d27V3HdezY+SBpkKBFoBZxQEKIOwfegBs3rtwoPABvw3sgceKAuFWtUBBSaT6ctvHXer2zOElTVaoKI/2lWWl/O//ZGZi8jgSPxFv3JX93+CJvfJ4/09++vzH6S/SVH59+IohH5JagxBilC4zNHHigSLvtTCPRnLYxtB4b29ojGglBc1PG1PAyLfUxzszIX7B86MwLP/iVkS566DWeEgo+gfrWdV1VJoZgpUdqon84p1a+wxI1CA+l3Z+yqu89N5a9v65EVgK8TOpgH/edZS6JAZ97/AkfKjF3pTpRkUrlfQFnoGlaHNc2F0sAzPIFWIl9WMEGTYUZJfyB12ED2l9UE6bkDAcoy+0QznXJ8nIEBosNuIb3xLoBNIlRhNlc7Ho9dDA6l1OC8gKGUGEnhAyBFmpSu8zqf9jAzqZ/RIUxFDR0G2LQ6ueIwUzGFIuE95livS4p2RaUVQYas/p+xQ4eiavPqO2nKPUcCrvlCR50uqlirXGeiUWeua4uva6vebNDwHIJErq2fW0Mdfcxpjqmqe37Nnd73US64Ummt8a5bCpZhh5UrZanfS9gBw/5tcorGSz1TJ/rCTljoomOGDTLsh+NUz8Ypdz/ndBwlpFeIdn7Hevm9miD9QNxdVGNSQzGSR3ao6Duekm23fqT3Al/Ju3waAEnr1xyayxnymhgNcU9Z7sx5LtWA+6bquxXaeLr5J+wMZebRQwDiwW2x0O7I1y7ZxOrS+X/4Y0DXJ0pANhgM4sKRv4KMACD6UDbVgTzkgAAAABJRU5ErkJggg==) no-repeat center center;width:15px;height:15px;position:absolute;right:0;top:6px}#overlay_panel label{margin:0;font-size:14px}#overlay_panel .content-mgnt-block,#overlay_panel #images_mgnt{text-align:left;padding:3px 4px;margin:2px;border:1px #777 solid;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px}#overlay_panel .content-mgnt-block legend,#overlay_panel #images_mgnt legend{font-size:10px;padding:0 3px;margin-left:10px}#overlay_panel .slider-block{display:block}#overlay_panel .slider-block label{font-size:70%;margin:0 5px 0 0;vertical-align:top}#overlay_panel .slider-block input[type=range]{margin:0}#overlay_panel #images_mgnt{width:186px}#overlay_panel #images_mgnt .controls{padding-bottom:5px}#overlay_panel #images_mgnt .controls label{margin-right:5px}#overlay_panel #images_mgnt .overlay-image-block{text-align:left;position:relative;width:186px;border:1px solid rgba(255,255,255,0.2);border-right:none;border-left:none}#overlay_panel #images_mgnt .overlay-image-block.hovered{background-color:rgba(255,255,0,0.5)}#overlay_panel #images_mgnt .overlay-image-block .del-button{position:absolute;right:0;top:0;margin:1px;cursor:pointer;border:1px #AAA solid;font-size:10px;line-height:13px;background-color:#444;color:white;font-weight:bold;padding:0 3px}#overlay_panel #images_mgnt .dynamic-adds label{font-size:75%}#overlay_panel #images_mgnt .dynamic-adds input{width:95px;font-size:10px}#overlay_panel input[type=checkbox],#overlay_panel label,#overlay_panel #contentSlider,#overlay_panel .zindex-switch{display:inline}#overlay_panel input[type=checkbox]{vertical-align:middle;margin:-3px 5px 0 0}#overlay_me_images_container{position:absolute;z-index:4;top:0;left:0}#overlay_me_images_container div{position:absolute}#overlay_me_images_container div.highlight{border:2px solid red;margin-top:-2px;margin-left:-2px}#overlay_me_images_container div:hover{cursor:move}#overlay_me_images_container img{position:absolute;top:0;left:0}#overlay_me_menu.collapsed .drag-me,#overlay_me_menu.collapsed .menu-item{width:25px}#overlay_me_menu.collapsed .drag-me{height:10px;overflow:hidden}#overlay_me_menu.collapsed button{height:10px;overflow:hidden}#overlay_me_menu.collapsed .overlay-image-block{height:14px;margin-top:3px}#overlay_me_menu.collapsed .overlay-image-block label,#overlay_me_menu.collapsed #content_div_management_block,#overlay_me_menu.collapsed .controls,#overlay_me_menu.collapsed input[type=range],#overlay_me_menu.collapsed #overlay_panel #contentSlider,#overlay_me_menu.collapsed legend,#overlay_me_menu.collapsed .dynamic-adds,#overlay_me_menu.collapsed .unicorns,#overlay_me_menu.collapsed button.reset,#overlay_me_menu.collapsed button.hide,#overlay_me_menu.collapsed button.del-button{display:none}</style>');window.OverlayMe={};window.OverlayMe.Mixin={};OverlayMe.isLoaded=function(){return window.overlay_me_loaded;};OverlayMe.isMobile=function(){return navigator.userAgent.match(/(iPhone|iPod|iPad|Android)/);};OverlayMe.mustLoad=function(){return!OverlayMe.isLoaded()&&!OverlayMe.isMobile();};OverlayMe.clearAndReload=function(){localStorage.clear();return window.location.reload();};}).call(this);(function(){OverlayMe.Mixin.Storable={loadCss:function(element,default_css){var cssData;if(element==null){element=this.el;}
715
+ element.style.setProperty(prop,styles[prop],'important');}})();(function(){$o('head').append('<style rel="stylesheet" type="text/css">button{font-size:9px;margin:0 3px;padding:0 3px}#overlay_me_page_container{position:relative}#overlay_me_menu{position:fixed;right:0;z-index:990}#overlay_me_menu *{line-height:14px}#overlay_me_menu .drag-me{line-height:100%;display:block;color:black;font-size:.7em;text-align:center;background-image:-webkit-gradient(linear,0deg,0deg,color-stop(0%,#999),color-stop(30%,#ddd),color-stop(70%,#ddd),color-stop(100%,#999));background-image:-webkit-linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);background-image:-moz-linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);background-image:-o-linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);background-image:-ms-linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);background-image:linear-gradient(0deg,#999,#ddd 30%,#ddd 70%,#999 100%);padding:1px}#overlay_me_menu .drag-me:hover{cursor:move}#overlay_me_menu ul{list-style:none;margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}.menu-item{text-align:left;background-color:#CCC;border:1px solid rgba(255,255,255,0.2);width:200px}.menu-item a.collaps-button{cursor:pointer;position:absolute;padding-top:9px;padding-left:5px;width:13px;height:9px;border:none;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAJCAYAAADpeqZqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIlJREFUeNpivHDhQujz589TmZiYvjMQAP/+/eOQkZGZyfD//38ZIL77nzhwG4ilQJpA2BiIPxHQ8BGIDUHqYZpAOIWApiSYWmRNIDfPxaYaKD4bWR2KJiDmA+KzaHrOQMVxagJhfSD+ALXhA5TPQEgTCCcD8V+gpmRs8rg0MQI1eANpJmzyAAEGAKD/bax/HrzbAAAAAElFTkSuQmCC) no-repeat center 3px}.menu-item a.collaps-button span{display:none;color:yellow}.menu-item a.collaps-button span:hover{color:yellow}.menu-item label.title{padding-left:20px;color:white;cursor:pointer;width:187px;line-height:1.1em;font-size:14px;background:none}.menu-item.collapsed .item-content{display:none}.menu-item.collapsed a.collaps-button{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANCAYAAAB7AEQGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAKtJREFUeNpiuHz5ctD///+lgJgBF2Z68uRJOgMDw0EgNmTAAZiA4AeQVgHiA0CchFUREpsPiOcCjZ8NZWNVBAaMjIwpQGofEOvjVAQFxkATDwJxMkgNCy7HAk3kB1KzgApf4DIJBD4CcRpQ8TZcJp2D+vQiVjcBjZ8HpBxhCtAVfQbiVKDxIMd+QtbI8u/fP04gfQ+Iw4D4LDa7WSQlJUGBdxyIn+DyAUCAAQDxsEXD9kreLQAAAABJRU5ErkJggg==) no-repeat center top}#overlay_panel .content-mgnt-block{position:relative;line-height:10px}#overlay_panel .content-mgnt-block .unicorns{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA8AAAAPCAYAAAA71pVKAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAklJREFUeNqEks1u00AQx3d27V3HdezY+SBpkKBFoBZxQEKIOwfegBs3rtwoPABvw3sgceKAuFWtUBBSaT6ctvHXer2zOElTVaoKI/2lWWl/O//ZGZi8jgSPxFv3JX93+CJvfJ4/09++vzH6S/SVH59+IohH5JagxBilC4zNHHigSLvtTCPRnLYxtB4b29ojGglBc1PG1PAyLfUxzszIX7B86MwLP/iVkS566DWeEgo+gfrWdV1VJoZgpUdqon84p1a+wxI1CA+l3Z+yqu89N5a9v65EVgK8TOpgH/edZS6JAZ97/AkfKjF3pTpRkUrlfQFnoGlaHNc2F0sAzPIFWIl9WMEGTYUZJfyB12ED2l9UE6bkDAcoy+0QznXJ8nIEBosNuIb3xLoBNIlRhNlc7Ho9dDA6l1OC8gKGUGEnhAyBFmpSu8zqf9jAzqZ/RIUxFDR0G2LQ6ueIwUzGFIuE95livS4p2RaUVQYas/p+xQ4eiavPqO2nKPUcCrvlCR50uqlirXGeiUWeua4uva6vebNDwHIJErq2fW0Mdfcxpjqmqe37Nnd73US64Ummt8a5bCpZhh5UrZanfS9gBw/5tcorGSz1TJ/rCTljoomOGDTLsh+NUz8Ypdz/ndBwlpFeIdn7Hevm9miD9QNxdVGNSQzGSR3ao6Duekm23fqT3Al/Ju3waAEnr1xyayxnymhgNcU9Z7sx5LtWA+6bquxXaeLr5J+wMZebRQwDiwW2x0O7I1y7ZxOrS+X/4Y0DXJ0pANhgM4sKRv4KMACD6UDbVgTzkgAAAABJRU5ErkJggg==) no-repeat center center;width:15px;height:15px;position:absolute;right:0;top:6px}#overlay_panel label{margin:0;font-size:14px}#overlay_panel .content-mgnt-block,#overlay_panel #images_mgnt{text-align:left;padding:3px 4px;margin:2px;border:1px #777 solid;-webkit-border-radius:5px;-moz-border-radius:5px;-ms-border-radius:5px;-o-border-radius:5px;border-radius:5px}#overlay_panel .content-mgnt-block legend,#overlay_panel #images_mgnt legend{font-size:10px;padding:0 3px;margin-left:10px}#overlay_panel .slider-block{display:block}#overlay_panel .slider-block label{font-size:60%;margin:0 5px 0 0;vertical-align:top}#overlay_panel .slider-block input[type=range]{margin:0;height:14px;width:120px}#overlay_panel #images_mgnt{width:186px}#overlay_panel #images_mgnt .controls{padding-bottom:2px}#overlay_panel #images_mgnt .controls label{margin-right:5px}#overlay_panel #images_mgnt .overlay-image-block,#overlay_panel #images_mgnt .images_dir{border:1px solid rgba(255,255,255,0.2);border-right:none;border-left:none;padding-top:2px}#overlay_panel #images_mgnt .overlay-image-block:first-child,#overlay_panel #images_mgnt .images_dir:first-child{border-top:none;padding-top:0}#overlay_panel #images_mgnt .overlay-image-block{text-align:left;position:relative;width:186px}#overlay_panel #images_mgnt .overlay-image-block.hovered{background-color:rgba(255,255,0,0.5)}#overlay_panel #images_mgnt .overlay-image-block .del-button{position:absolute;right:0;top:0;margin:1px;cursor:pointer;border:1px #AAA solid;font-size:10px;line-height:13px;background-color:#444;color:white;font-weight:bold;padding:0 3px}#overlay_panel #images_mgnt .images_dir{line-height:18px}#overlay_panel #images_mgnt .images_dir .sub-block{border-left:2px white solid;padding-left:2px;margin-left:5px}#overlay_panel #images_mgnt .images_dir>input[type=checkbox]{-webkit-appearance:none;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAkAAAANCAYAAAB7AEQGAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAKtJREFUeNpiuHz5ctD///+lgJgBF2Z68uRJOgMDw0EgNmTAAZiA4AeQVgHiA0CchFUREpsPiOcCjZ8NZWNVBAaMjIwpQGofEOvjVAQFxkATDwJxMkgNCy7HAk3kB1KzgApf4DIJBD4CcRpQ8TZcJp2D+vQiVjcBjZ8HpBxhCtAVfQbiVKDxIMd+QtbI8u/fP04gfQ+Iw4D4LDa7WSQlJUGBdxyIn+DyAUCAAQDxsEXD9kreLQAAAABJRU5ErkJggg==) no-repeat center center;display:inline-block;width:13px;height:13px}#overlay_panel #images_mgnt .images_dir>input[type=checkbox]:checked{background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA0AAAAJCAYAAADpeqZqAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIlJREFUeNpivHDhQujz589TmZiYvjMQAP/+/eOQkZGZyfD//38ZIL77nzhwG4ilQJpA2BiIPxHQ8BGIDUHqYZpAOIWApiSYWmRNIDfPxaYaKD4bWR2KJiDmA+KzaHrOQMVxagJhfSD+ALXhA5TPQEgTCCcD8V+gpmRs8rg0MQI1eANpJmzyAAEGAKD/bax/HrzbAAAAAElFTkSuQmCC) no-repeat center center;width:13px;height:13px;margin:-2px 5px 0 0}#overlay_panel #images_mgnt .dynamic-adds{padding-top:4px}#overlay_panel #images_mgnt .dynamic-adds label{font-size:75%}#overlay_panel #images_mgnt .dynamic-adds input{width:95px;font-size:10px;margin-left:2px}#overlay_panel #images_mgnt .dynamic-adds button{font-size:10px}#overlay_panel input[type=checkbox],#overlay_panel label,#overlay_panel #contentSlider,#overlay_panel .zindex-switch{display:inline}#overlay_panel input[type=checkbox]{vertical-align:middle;margin:-3px 5px 0 0}#overlay_me_images_container{position:absolute;z-index:4;top:0;left:0}#overlay_me_images_container div{position:absolute}#overlay_me_images_container div.highlight{border:2px solid red;margin-top:-2px;margin-left:-2px}#overlay_me_images_container div:hover{cursor:move}#overlay_me_images_container img{position:absolute;top:0;left:0}#overlay_me_menu.collapsed .drag-me,#overlay_me_menu.collapsed .menu-item{width:25px}#overlay_me_menu.collapsed .drag-me{height:10px;overflow:hidden}#overlay_me_menu.collapsed button{height:10px;overflow:hidden}#overlay_me_menu.collapsed .overlay-image-block{height:14px;margin-top:3px}#overlay_me_menu.collapsed .overlay-image-block label,#overlay_me_menu.collapsed #content_div_management_block,#overlay_me_menu.collapsed .controls,#overlay_me_menu.collapsed input[type=range],#overlay_me_menu.collapsed #overlay_panel #contentSlider,#overlay_me_menu.collapsed legend,#overlay_me_menu.collapsed .dynamic-adds,#overlay_me_menu.collapsed .unicorns,#overlay_me_menu.collapsed button.reset,#overlay_me_menu.collapsed button.hide,#overlay_me_menu.collapsed button.del-button{display:none}</style>');window.OverlayMe={};window.OverlayMe.Mixin={};OverlayMe.isLoaded=function(){return window.overlay_me_loaded;};OverlayMe.isMobile=function(){return navigator.userAgent.match(/(iPhone|iPod|iPad|Android)/);};OverlayMe.mustLoad=function(){return!OverlayMe.isLoaded()&&!OverlayMe.isMobile();};OverlayMe.clearAndReload=function(){localStorage.clear();return window.location.reload();};}).call(this);(function(){OverlayMe.Mixin.Storable={loadCss:function(element,default_css){var cssData;if(element==null){element=this.el;}
716
+ if(!this.id){return;}
706
717
  if((cssData=localStorage.getItem(this.id))){return $o(element).css(JSON.parse(cssData));}else{if(default_css!==void 0){return $o(element).css(default_css);}}},saveCss:function(element){var cssData,css_attribute,_i,_len,_ref;if(element==null){element=this.el;}
718
+ if(!this.id){return;}
707
719
  if(!this.css_attributes_to_save){this.css_attributes_to_save=['top','left','display','opacity'];}
708
720
  cssData={};_ref=this.css_attributes_to_save;for(_i=0,_len=_ref.length;_i<_len;_i++){css_attribute=_ref[_i];cssData[css_attribute]=$o(element).css(css_attribute);}
709
- return localStorage.setItem(this.id,JSON.stringify(cssData));}};}).call(this);(function(){OverlayMe.Mixin.Hideable={isDisplayed:function(){return $o(this.el).css('display')!=='none';},toggleDisplay:function(default_display_type){if(default_display_type==null){default_display_type='block';}
710
- if(this.isDisplayed()){$o(this.el).css({display:'none'});}else{$o(this.el).css({display:default_display_type});}
711
- return this.saveCss();}};}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Draggable=(function(_super){__extends(Draggable,_super);Draggable.name='Draggable';function Draggable(){return Draggable.__super__.constructor.apply(this,arguments);}
721
+ return localStorage.setItem(this.id,JSON.stringify(cssData));}};}).call(this);(function(){OverlayMe.Mixin.Hideable={isDisplayed:function(){var element;element=this.el||this;return $o(element).css('display')!=='none';},toggleDisplay:function(default_display_type){if(default_display_type==null){default_display_type='block';}
722
+ if(this.isDisplayed()){return this.hide();}else{return this.show(default_display_type);}},show:function(default_display_type){var element;if(default_display_type==null){default_display_type='block';}
723
+ element=this.el||this;$o(element).css({display:default_display_type});return this.saveState();},hide:function(){var element;element=this.el||this;$o(element).css({display:'none'});return this.saveState();},saveState:function(){var element;element=this.el||this;if(this.saveCss){return this.saveCss(element);}}};}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Draggable=(function(_super){__extends(Draggable,_super);Draggable.name='Draggable';function Draggable(){return Draggable.__super__.constructor.apply(this,arguments);}
712
724
  Draggable.prototype.tagName='div';Draggable.prototype.css_attributes_to_save=['top','left','display','opacity'];Draggable.prototype.initialize=function(attributes,options){Draggable.__super__.initialize.call(this,attributes,options);return this.loadCss(this.el,options.default_css);};Draggable.prototype.engageMove=function(event){var _this=this;event.preventDefault();this.moving=true;this.lastX=event.clientX;this.lastY=event.clientY;$o(window).bind('mymousemove',function(event,mouseEvent){_this.updateOverlay(mouseEvent.clientX-_this.lastX,mouseEvent.clientY-_this.lastY);_this.lastX=mouseEvent.clientX;return _this.lastY=mouseEvent.clientY;});return $o(this.el).addClass('on-move');};Draggable.prototype.endMove=function(event){this.moving=false;$o(window).unbind('mymousemove');return $o(this.el).removeClass('on-move');};Draggable.prototype.toggleMove=function(event){if(this.moving){return this.endMove(event);}else{return this.engageMove(event);}};Draggable.prototype.updateOverlay=function(x,y){var newX,newY;newX=parseInt($o(this.el).css('left'))+x;newY=parseInt($o(this.el).css('top'))+y;$o(this.el).css({top:""+newY+"px",left:""+newX+"px"});return this.saveCss();};Draggable.prototype.render=function(){return this.el;};return Draggable;})(Backbone.View);_.extend(OverlayMe.Draggable.prototype,OverlayMe.Mixin.Storable);_.extend(OverlayMe.Draggable.prototype,OverlayMe.Mixin.Hideable);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.MenuClass=(function(_super){__extends(MenuClass,_super);MenuClass.name='MenuClass';function MenuClass(){return MenuClass.__super__.constructor.apply(this,arguments);}
713
- MenuClass.prototype.id='overlay_me_menu';MenuClass.prototype.initialize=function(attributes){var drag_me_line,_this=this;MenuClass.__super__.initialize.call(this,attributes,{default_css:{top:'50px'}});drag_me_line=(new Backbone.View).make('div',{"class":'drag-me'},'Drag me up and down');this.menu_list=(new Backbone.View).make('ul');$o(this.el).append(drag_me_line);$o(this.el).append(this.menu_list);$o('body').append(this.render());$o(drag_me_line).bind('mousedown',function(event){return _this.toggleMove(event);});$o(window).bind('mouseup',function(event){return _this.endMove(event);});return $o(window).bind('overlay_me:toggle_all_display',function(){return _this.toggleDisplay();});};MenuClass.prototype.append=function(element){return this.menu_list.appendChild(element);};MenuClass.prototype.toggleCollapse=function(){if($o(this.el).hasClass('collapsed')){return $o(this.el).removeClass('collapsed');}else{return $o(this.el).addClass('collapsed');}};return MenuClass;})(OverlayMe.Draggable);if(!OverlayMe.menu_box){OverlayMe.menu=new OverlayMe.MenuClass();}}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.MenuItem=(function(_super){__extends(MenuItem,_super);MenuItem.name='MenuItem';function MenuItem(){return MenuItem.__super__.constructor.apply(this,arguments);}
714
- MenuItem.prototype.tagName='li';MenuItem.prototype.className='menu-item';MenuItem.prototype.initialize=function(attributes,options){var _this=this;this.id=attributes.id;this.el.appendChild(this.collapseButton());this.title=this.make('label',{"class":'title'},attributes.title);$o(this.title).bind('click',function(){return _this.toggleCollapse();});this.el.appendChild(this.title);this.content=this.make('div',{"class":'item-content'});this.el.appendChild(this.content);this.collapsed=(localStorage.getItem(""+this.id+"-collapsed")===''?false:true);return this.setCollapse(this.collapsed);};MenuItem.prototype.collapseButton=function(){var _this=this;this.collapseButton=this.make('a',{"class":'collaps-button'},'<span>o</span>');$o(this.collapseButton).bind('click',function(){return _this.toggleCollapse();});return this.collapseButton;};MenuItem.prototype.toggleCollapse=function(){this.collapsed=!this.collapsed;this.setCollapse(this.collapsed);return this.saveState();};MenuItem.prototype.setCollapse=function(toCollapse){if(toCollapse){return $o(this.el).addClass('collapsed');}else{return $o(this.el).removeClass('collapsed');}};MenuItem.prototype.append=function(childElemt){return this.content.appendChild(childElemt);};MenuItem.prototype.render=function(){return this.el;};MenuItem.prototype.saveState=function(){return localStorage.setItem(""+this.id+"-collapsed",(this.collapsed?1:''));};return MenuItem;})(Backbone.View);}).call(this);(function(){var basics_panel,clear_all_button,collapse_button,hide_button,_this=this;if(OverlayMe.mustLoad()){basics_panel=new OverlayMe.MenuItem({id:"bacis-options",title:"Basics"});collapse_button=(new Backbone.View).make('button',{"class":'collapse'},'Collapse (c)');$o(collapse_button).bind('click',function(event){return OverlayMe.menu.toggleCollapse();});basics_panel.append(collapse_button);clear_all_button=(new Backbone.View).make('button',{"class":'reset',onClick:"javascript: OverlayMe.clearAndReload()"},'Reset All (r)');basics_panel.append(clear_all_button);hide_button=(new Backbone.View).make('button',{"class":'hide'},'Hide (h)');$o(hide_button).bind('click',function(event){return $o(window).trigger('overlay_me:toggle_all_display');});basics_panel.append(hide_button);OverlayMe.menu.append(basics_panel.render());$o(window).bind('keypress',function(event){if(event.charCode===104){$o(window).trigger('overlay_me:toggle_all_display');}
725
+ MenuClass.prototype.id='overlay_me_menu';MenuClass.prototype.initialize=function(attributes){var drag_me_line,_this=this;MenuClass.__super__.initialize.call(this,attributes,{default_css:{top:'50px'}});drag_me_line=(new Backbone.View).make('div',{"class":'drag-me'},'Drag me up and down');this.menu_list=(new Backbone.View).make('ul');$o(this.el).append(drag_me_line);$o(this.el).append(this.menu_list);$o('body').append(this.render());$o(drag_me_line).bind('mousedown',function(event){return _this.toggleMove(event);});$o(window).bind('mouseup',function(event){return _this.endMove(event);});return $o(window).bind('overlay_me:toggle_all_display',function(){return _this.toggleDisplay();});};MenuClass.prototype.append=function(element){return this.menu_list.appendChild(element);};MenuClass.prototype.toggleCollapse=function(){if($o(this.el).hasClass('collapsed')){return $o(this.el).removeClass('collapsed');}else{return $o(this.el).addClass('collapsed');}};return MenuClass;})(OverlayMe.Draggable);if(OverlayMe.mustLoad()){if(!OverlayMe.menu_box){OverlayMe.menu=new OverlayMe.MenuClass();}}}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.MenuItem=(function(_super){__extends(MenuItem,_super);MenuItem.name='MenuItem';function MenuItem(){return MenuItem.__super__.constructor.apply(this,arguments);}
726
+ MenuItem.prototype.tagName='li';MenuItem.prototype.className='menu-item';MenuItem.prototype.initialize=function(attributes,options){var _this=this;this.id=attributes.id;this.el.appendChild(this.collapseButton());this.title=this.make('label',{"class":'title'},attributes.title);$o(this.title).bind('click',function(){return _this.toggleCollapse();});this.el.appendChild(this.title);this.content=this.make('div',{"class":'item-content'});this.el.appendChild(this.content);this.collapsed=(localStorage.getItem(""+this.id+"-collapsed")===''?false:true);return this.setCollapse(this.collapsed);};MenuItem.prototype.collapseButton=function(){var _this=this;this.collapseButton=this.make('a',{"class":'collaps-button'},'<span>o</span>');$o(this.collapseButton).bind('click',function(){return _this.toggleCollapse();});return this.collapseButton;};MenuItem.prototype.toggleCollapse=function(){this.collapsed=!this.collapsed;this.setCollapse(this.collapsed);return this.saveState();};MenuItem.prototype.setCollapse=function(toCollapse){if(toCollapse){return $o(this.el).addClass('collapsed');}else{return $o(this.el).removeClass('collapsed');}};MenuItem.prototype.append=function(childElemt){return this.content.appendChild(childElemt);};MenuItem.prototype.render=function(){return this.el;};MenuItem.prototype.saveState=function(){return localStorage.setItem(""+this.id+"-collapsed",(this.collapsed?1:''));};return MenuItem;})(Backbone.View);}).call(this);(function(){var basics_panel,clear_all_button,collapse_button,hide_button,toggle_all_display,_this=this;if(OverlayMe.mustLoad()){basics_panel=new OverlayMe.MenuItem({id:"bacis-options",title:"Basics"});collapse_button=(new Backbone.View).make('button',{"class":'collapse'},'Collapse (c)');$o(collapse_button).bind('click',function(event){return OverlayMe.menu.toggleCollapse();});basics_panel.append(collapse_button);clear_all_button=(new Backbone.View).make('button',{"class":'reset',onClick:"javascript: OverlayMe.clearAndReload()"},'Reset All (r)');basics_panel.append(clear_all_button);toggle_all_display=function(){$o(window).trigger('overlay_me:toggle_all_display');return $o(window).trigger('overlay_me:toggle_overlay_me_images_container_display');};hide_button=(new Backbone.View).make('button',{"class":'hide'},'Hide (h)');$o(hide_button).bind('click',function(event){return toggle_all_display();});basics_panel.append(hide_button);OverlayMe.menu.append(basics_panel.render());$o(window).bind('keypress',function(event){if(event.charCode===104){toggle_all_display();}
715
727
  if(event.charCode===99){OverlayMe.menu.toggleCollapse();}
716
- if(event.charCode===114){return OverlayMe.clearAndReload();}});}}).call(this);(function(){OverlayMe.Overlays={};OverlayMe.Overlays.urlToId=function(url){return url.replace(/[.:\/]/g,'_').replace(/[^a-zA-Z0-9_\-]/g,'');};OverlayMe.unicorns=["http://fc07.deviantart.net/fs49/f/2009/200/b/3/Fat_Unicorn_and_the_Rainbow_by_la_ratta.jpg","http://www.deviantart.com/download/126388773/Unicorn_Pukes_Rainbow_by_Angel35W.jpg","http://macmcrae.com/wp-content/uploads/2010/02/unicorn.jpg","http://4.bp.blogspot.com/-uPLiez-m9vY/TacC_Bmsn3I/AAAAAAAAAyg/jusQIA8aAME/s1600/Behold_A_Rainbow_Unicorn_Ninja_by_Jess4921.jpg","http://www.everquestdragon.com/everquestdragon/main/image.axd?picture=2009%2F9%2FPaperPaperNewrainbow.png"];}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.ImagesContainer=(function(_super){__extends(ImagesContainer,_super);ImagesContainer.name='ImagesContainer';function ImagesContainer(){return ImagesContainer.__super__.constructor.apply(this,arguments);}
717
- ImagesContainer.prototype.id='overlay_me_images_container';ImagesContainer.prototype.css_attributes_to_save=['display'];ImagesContainer.prototype.initialize=function(){var container,_this=this;container=$o('#overlay_me_images_container');if(container.length<1){container=this.make('div',{id:'overlay_me_images_container'});$o('body').append(container);this.el=container;}
718
- this.loadCss();return $o(window).bind('overlay_me:toggle_all_display',function(){return _this.toggleDisplay();});};return ImagesContainer;})(Backbone.View);_.extend(OverlayMe.Overlays.ImagesContainer.prototype,OverlayMe.Mixin.Storable);_.extend(OverlayMe.Overlays.ImagesContainer.prototype,OverlayMe.Mixin.Hideable);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.DraggableImage=(function(_super){__extends(DraggableImage,_super);DraggableImage.name='DraggableImage';function DraggableImage(){return DraggableImage.__super__.constructor.apply(this,arguments);}
728
+ if(event.charCode===114){return OverlayMe.clearAndReload();}});}}).call(this);(function(){OverlayMe.Overlays={};OverlayMe.Overlays.urlToId=function(url){return url.replace(/[.:\/]/g,'_').replace(/[^a-zA-Z0-9_\-]/g,'');};OverlayMe.unicorns=["http://fc07.deviantart.net/fs49/f/2009/200/b/3/Fat_Unicorn_and_the_Rainbow_by_la_ratta.jpg","http://www.deviantart.com/download/126388773/Unicorn_Pukes_Rainbow_by_Angel35W.jpg","http://macmcrae.com/wp-content/uploads/2010/02/unicorn.jpg","http://4.bp.blogspot.com/-uPLiez-m9vY/TacC_Bmsn3I/AAAAAAAAAyg/jusQIA8aAME/s1600/Behold_A_Rainbow_Unicorn_Ninja_by_Jess4921.jpg","http://www.everquestdragon.com/everquestdragon/main/image.axd?picture=2009%2F9%2FPaperPaperNewrainbow.png"];}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.ContainerItself=(function(_super){__extends(ContainerItself,_super);ContainerItself.name='ContainerItself';function ContainerItself(){return ContainerItself.__super__.constructor.apply(this,arguments);}
729
+ ContainerItself.prototype.tagName='div';ContainerItself.prototype.css_attributes_to_save=['display'];ContainerItself.prototype.initialize=function(attributes,options){var _this=this;ContainerItself.__super__.initialize.call(this,attributes,options);this.loadCss();return $o(window).bind("overlay_me:toggle_"+this.id+"_display",function(event,options){if(options){if(options.show){return _this.show();}else{return _this.hide();}}else{return _this.toggleDisplay();}});};return ContainerItself;})(Backbone.View);_.extend(OverlayMe.Overlays.ContainerItself.prototype,OverlayMe.Mixin.Storable);_.extend(OverlayMe.Overlays.ContainerItself.prototype,OverlayMe.Mixin.Hideable);OverlayMe.Overlays.ImagesContainer=(function(_super){__extends(ImagesContainer,_super);ImagesContainer.name='ImagesContainer';function ImagesContainer(){return ImagesContainer.__super__.constructor.apply(this,arguments);}
730
+ ImagesContainer.prototype.initialize=function(options){var container;if(!OverlayMe.images_container){OverlayMe.images_container=new OverlayMe.Overlays.ContainerItself({id:'overlay_me_images_container'});$o('body').append(OverlayMe.images_container.el);}
731
+ if(options.parent_path){container=this.subDirContainer(options.parent_path);}else{container=OverlayMe.images_container;}
732
+ return this.el=container.el||container;};ImagesContainer.prototype.subDirContainer=function(path,done_bits){var path_bits,sub_container,sub_container_parent_post_string,the_dir;if(done_bits==null){done_bits=[];}
733
+ path_bits=_.difference(path.split('/'),_.union(done_bits,''));the_dir=path_bits.slice(0,1).toString();if(done_bits.length>0){sub_container_parent_post_string=done_bits.join(' ').replace(/\ ?(\w+)/g,' #$1_container');}else{sub_container_parent_post_string='';}
734
+ sub_container=$o("#overlay_me_images_container "+sub_container_parent_post_string+" #"+(the_dir+'_container'));if(sub_container.length<1){sub_container=new OverlayMe.Overlays.ContainerItself({id:the_dir+'_container'});$o("#overlay_me_images_container "+sub_container_parent_post_string).append(sub_container.el);}
735
+ if(path_bits.length>1){done_bits.push(the_dir);return this.subDirContainer(path,done_bits);}else{return sub_container;}};return ImagesContainer;})(Backbone.View);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.DraggableImage=(function(_super){__extends(DraggableImage,_super);DraggableImage.name='DraggableImage';function DraggableImage(){return DraggableImage.__super__.constructor.apply(this,arguments);}
719
736
  DraggableImage.prototype.initialize=function(attributes,options){var _this=this;DraggableImage.__super__.initialize.call(this,attributes,options);this.image=new Image();$o(this.image).load(function(){return _this.fitDivToImage();});$o(this.image).attr('src',options.image_src);$o(this.el).append(this.image);if($o(this.el).css('left')==='auto'||$o(this.el).css('left')===''){$o(this.el).css('left','0px');}
720
737
  if($o(this.el).css('top')==='auto'||$o(this.el).css('top')===''){$o(this.el).css('top','0px');}
721
738
  $o(this.el).bind('mousedown',function(event){return _this.toggleMove(event);});$o(window).bind('mouseup',function(event){return _this.endMove(event);});$o(this.el).bind('mouseover',function(event){return $o(".overlay-image-block[data-img-id="+_this.id+"]").addClass('hovered');});return $o(this.el).bind('mouseout',function(event){return $o(".overlay-image-block[data-img-id="+_this.id+"]").removeClass('hovered');});};DraggableImage.prototype.fitDivToImage=function(){if(this.image.width>0){$o(this.el).css('width',this.image.width);return $o(this.el).css('height',this.image.height);}};DraggableImage.prototype.render=function(){return this.el;};return DraggableImage;})(OverlayMe.Draggable);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.Image=(function(_super){__extends(Image,_super);Image.name='Image';function Image(){return Image.__super__.constructor.apply(this,arguments);}
722
- Image.prototype.tagName='div';Image.prototype.className='overlay-image-block';Image.prototype.initialize=function(image_src,options){var slider_block,_this=this;if(options==null){options={destroyable:false};}
723
- this.image_src=image_src;this.image_id=OverlayMe.Overlays.urlToId(image_src);$o(this.el).attr('data-img-id',this.image_id);if(!OverlayMe.images_container){OverlayMe.images_container=new OverlayMe.Overlays.ImagesContainer();}
724
- this.default_css=$o.extend({display:'none',opacity:0.5},options.default_css);if(!($o("#"+this.image_id,OverlayMe.images_container.el).length>0)){$o(OverlayMe.images_container.el).append(this.image());}
739
+ Image.prototype.tagName='div';Image.prototype.className='overlay-image-block';Image.prototype.initialize=function(image_src,options){var images_container,slider_block,_this=this;$o.extend({destroyable:false},options);this.image_src=image_src;this.image_id=OverlayMe.Overlays.urlToId(image_src);$o(this.el).attr('data-img-id',this.image_id);images_container=new OverlayMe.Overlays.ImagesContainer({parent_path:options.parent_path});this.default_css=$o.extend({display:'none',opacity:0.5},options.default_css);if(!($o("#"+this.image_id,images_container.el).length>0)){$o(images_container.el).append(this.image());}
725
740
  $o(this.el).append(this.checkbox());$o(this.el).append(this.label());slider_block=this.make('div',{"class":'slider-block'});$o(this.el).append(slider_block);slider_block.appendChild(this.make('label',{},'Opacity'));slider_block.appendChild(this.slider());if(options.destroyable){$o(this.el).append(this.delButton());}
726
- $o(this.el).bind('click',function(event){return _this.flickCheckbox();});$o(this.el).bind('mouseover',function(event){$o(_this.image.el).addClass('highlight');return $o(_this.el).addClass('hovered');});return $o(this.el).bind('mouseout',function(event){$o(_this.image.el).removeClass('highlight');return $o(_this.el).removeClass('hovered');});};Image.prototype.image=function(){this.image=new OverlayMe.Overlays.DraggableImage({id:this.image_id},{image_src:this.image_src,default_css:this.default_css});return this.image.render();};Image.prototype.checkbox=function(){var _this=this;this.checkbox=this.make('input',{type:"checkbox"});if(this.image.isDisplayed()){this.checkbox.checked=true;}
741
+ $o(this.el).bind('click',function(e){e.stopPropagation();return _this.flickCheckbox();});$o(this.el).bind('mouseover',function(event){$o(_this.image.el).addClass('highlight');return $o(_this.el).addClass('hovered');});return $o(this.el).bind('mouseout',function(event){$o(_this.image.el).removeClass('highlight');return $o(_this.el).removeClass('hovered');});};Image.prototype.image=function(){this.image=new OverlayMe.Overlays.DraggableImage({id:this.image_id},{image_src:this.image_src,default_css:this.default_css});return this.image.render();};Image.prototype.checkbox=function(){var _this=this;this.checkbox=this.make('input',{type:"checkbox"});if(this.image.isDisplayed()){this.checkbox.checked=true;}
727
742
  $o(this.checkbox).bind('click',function(e){e.stopPropagation();return _this.flickVisibility();});$o(this.checkbox).bind('change',function(e){e.stopPropagation();return _this.flickVisibility();});return this.checkbox;};Image.prototype.delButton=function(){var _this=this;this.delButton=this.make('button',{"class":'del-button',title:'Delete'},'x');$o(this.delButton).bind('click',function(e){return OverlayMe.dyn_manager.delImage(_this.image_id);});return this.delButton;};Image.prototype.flickCheckbox=function(){this.checkbox.checked=!this.checkbox.checked;return this.flickVisibility();};Image.prototype.flickVisibility=function(){if(this.checkbox.checked){$o(this.image.el).css('display','block');}else{$o(this.image.el).css('display','none');}
728
- return this.image.saveCss();};Image.prototype.label=function(){return this.label=this.make('label',{},this.image_src.replace(/.*\//,'').slice(-22));};Image.prototype.slider=function(){var _this=this;this.slider=this.make('input',{type:"range",value:$o(this.image.el).css('opacity')*100});$o(this.slider).bind('click',function(e){return e.stopPropagation();});$o(this.slider).bind('change',function(e){$o(_this.image.el).css('opacity',$o(_this.slider)[0].value/100);return _this.image.saveCss();});$o(this.slider).bind('mouseover',function(e){e.stopPropagation();return $o(_this.el).addClass('hovered');});$o(this.slider).bind('mouseout',function(e){e.stopPropagation();return $o(_this.el).removeClass('hovered');});return this.slider;};Image.prototype.render=function(){return this.el;};return Image;})(Backbone.View);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.DynamicManager=(function(_super){__extends(DynamicManager,_super);DynamicManager.name='DynamicManager';function DynamicManager(){return DynamicManager.__super__.constructor.apply(this,arguments);}
743
+ return this.image.saveCss();};Image.prototype.label=function(){return this.label=this.make('label',{},this.image_src.replace(/.*\//,'').slice(-22));};Image.prototype.slider=function(){var _this=this;this.slider=this.make('input',{type:"range",value:$o(this.image.el).css('opacity')*100});$o(this.slider).bind('click',function(e){return e.stopPropagation();});$o(this.slider).bind('change',function(e){$o(_this.image.el).css('opacity',$o(_this.slider)[0].value/100);return _this.image.saveCss();});$o(this.slider).bind('mouseover',function(e){e.stopPropagation();return $o(_this.el).addClass('hovered');});$o(this.slider).bind('mouseout',function(e){e.stopPropagation();return $o(_this.el).removeClass('hovered');});return this.slider;};Image.prototype.render=function(){return this.el;};return Image;})(Backbone.View);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.ImagesDirectory=(function(_super){__extends(ImagesDirectory,_super);ImagesDirectory.name='ImagesDirectory';function ImagesDirectory(){return ImagesDirectory.__super__.constructor.apply(this,arguments);}
744
+ ImagesDirectory.prototype.tagName='div';ImagesDirectory.prototype.className='images_dir';ImagesDirectory.prototype.initialize=function(dirname){var _this=this;this.dirname=dirname;this.contentBlock=this.make('div',{id:this.dirname,"class":'sub-block'});_.extend(this.contentBlock,OverlayMe.Mixin.Hideable);_.extend(this.contentBlock,OverlayMe.Mixin.Storable);this.contentBlock.css_attributes_to_save=['display'];this.contentBlock.loadCss(this.contentBlock);$o(this.el).append(this.checkbox());$o(this.el).append(this.label());$o(this.el).append(this.contentBlock);return $o(this.el).bind('click',function(e){e.stopPropagation();return _this.checkbox.click();});};ImagesDirectory.prototype.checkbox=function(){var _this=this;this.checkbox=this.make('input',{type:"checkbox"});if(this.contentBlock.isDisplayed()){this.checkbox.checked=true;}
745
+ $o(this.checkbox).bind('click',function(e){e.stopPropagation();return _this.flickVisibility();});return this.checkbox;};ImagesDirectory.prototype.flickVisibility=function(){if(this.checkbox.checked){this.contentBlock.show();}else{this.contentBlock.hide();}
746
+ return $o(window).trigger("overlay_me:toggle_"+this.dirname+"_container_display",{show:this.checkbox.checked});};ImagesDirectory.prototype.label=function(){return this.label=this.make('label',{},'/'+this.dirname+'/');};ImagesDirectory.prototype.append=function(block){return this.contentBlock.appendChild(block);};ImagesDirectory.prototype.render=function(){return this.el;};return ImagesDirectory;})(Backbone.View);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.DynamicManager=(function(_super){__extends(DynamicManager,_super);DynamicManager.name='DynamicManager';function DynamicManager(){return DynamicManager.__super__.constructor.apply(this,arguments);}
729
747
  DynamicManager.prototype.initialize=function(){var listJSON;if((listJSON=localStorage.getItem('dyn_image_list'))){return this.list=JSON.parse(listJSON);}else{return this.list=[];}};DynamicManager.prototype.isPresent=function(image_id){var saved,_i,_len,_ref;_ref=this.list;for(_i=0,_len=_ref.length;_i<_len;_i++){saved=_ref[_i];if(saved.id===image_id){return true;}}
730
748
  return false;};DynamicManager.prototype.isEmpty=function(){return this.list.length===0;};DynamicManager.prototype.addImage=function(src,options){var new_image;if(options==null){options={};}
731
749
  new_image=this.loadImage(src,options);if(new_image&&!this.isPresent(new_image.image_id)){this.list.push({id:new_image.image_id,src:new_image.image_src});this.saveList();}
@@ -736,5 +754,13 @@ return OverlayMe.images_management_div.del(image_id);};DynamicManager.prototype.
736
754
  return _results;};DynamicManager.prototype.saveList=function(){return localStorage.setItem('dyn_image_list',JSON.stringify(this.list));};return DynamicManager;})(Backbone.Model);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.ContentDivManagementBlock=(function(_super){__extends(ContentDivManagementBlock,_super);ContentDivManagementBlock.name='ContentDivManagementBlock';function ContentDivManagementBlock(){return ContentDivManagementBlock.__super__.constructor.apply(this,arguments);}
737
755
  ContentDivManagementBlock.prototype.tagName='fieldset';ContentDivManagementBlock.prototype.className='content-mgnt-block';ContentDivManagementBlock.prototype.id='content_div_management_block';ContentDivManagementBlock.prototype.css_attributes_to_save=['z-index','opacity'];ContentDivManagementBlock.prototype.normal_zindex='0';ContentDivManagementBlock.prototype.over_zindex='5';ContentDivManagementBlock.prototype.initialize=function(){var slider_block,unicorn_button,_this=this;this.page_container_div=this.make('div',{id:'overlay_me_page_container'});$o('body').append(this.page_container_div);$o('body > *').each(function(index,thing){if(!(thing.id.match(/^overlay_me/)||thing.tagName==='SCRIPT')){return $o(_this.page_container_div).append(thing);}});this.loadCss(this.page_container_div,{'z-index':this.normal_zindex});unicorn_button=this.make('div',{"class":'unicorns',title:'Feeling corny?'});$o(unicorn_button).bind('click',function(){return OverlayMe.dyn_manager.addImage(OverlayMe.unicorns[Math.floor(Math.random()*OverlayMe.unicorns.length)],{default_css:{opacity:1}});});$o(this.el).append(unicorn_button);$o(this.el).append(this.make('legend',{},'Page content'));slider_block=this.make('div',{"class":'slider-block'});$o(this.el).append(slider_block);slider_block.appendChild(this.make('label',{},'Opacity'));slider_block.appendChild(this.contentSlider());$o(this.el).append(this.zIndexSwitch());return this.bindEvents();};ContentDivManagementBlock.prototype.zIndexSwitch=function(){var block,label,_this=this;block=this.make('div',{"class":'zindex-switch'});this.zIndexSwitch=this.make('input',{type:"checkbox"});$o(block).append(this.zIndexSwitch);setTimeout(function(){if($o("#overlay_me_page_container").css('z-index')===_this.over_zindex){return _this.zIndexSwitch.checked=true;}},500);label=this.make('label',{},'Content on top (t)');$o(label).bind('click',function(){return $o(_this.zIndexSwitch).trigger('click');});return $o(block).append(label);};ContentDivManagementBlock.prototype.contentSlider=function(){return this.contentSlider=this.make('input',{id:"contentSlider",type:"range",value:$o("#overlay_me_page_container").css('opacity')*100});};ContentDivManagementBlock.prototype.bindEvents=function(){var _this=this;$o(this.contentSlider).bind('change',function(){$o("#overlay_me_page_container").css('opacity',$o(_this.contentSlider)[0].value/100);return _this.saveCss(_this.page_container_div);});$o(this.zIndexSwitch).bind('change',function(event){if(_this.zIndexSwitch.checked){$o("#overlay_me_page_container").css({'z-index':_this.over_zindex});}else{$o("#overlay_me_page_container").css({'z-index':_this.normal_zindex});}
738
756
  return _this.saveCss(_this.page_container_div);});return $o(window).bind('keypress',function(event){if(event.charCode===116){return $o(_this.zIndexSwitch).trigger('click');}});};ContentDivManagementBlock.prototype.render=function(){return this.el;};return ContentDivManagementBlock;})(Backbone.View);_.extend(OverlayMe.Overlays.ContentDivManagementBlock.prototype,OverlayMe.Mixin.Storable);}).call(this);(function(){var __hasProp={}.hasOwnProperty,__extends=function(child,parent){for(var key in parent){if(__hasProp.call(parent,key))child[key]=parent[key];}function ctor(){this.constructor=child;}ctor.prototype=parent.prototype;child.prototype=new ctor;child.__super__=parent.prototype;return child;};OverlayMe.Overlays.ImagesManagementDiv=(function(_super){__extends(ImagesManagementDiv,_super);ImagesManagementDiv.name='ImagesManagementDiv';function ImagesManagementDiv(){return ImagesManagementDiv.__super__.constructor.apply(this,arguments);}
739
- ImagesManagementDiv.prototype.tagName='fieldset';ImagesManagementDiv.prototype.id='images_mgnt';ImagesManagementDiv.prototype.initialize=function(){var check_all_label,_this=this;$o(this.el).append(this.make('legend',{},'Overlaying images'));this.controlBlock=this.make('div',{"class":'controls'});$o(this.el).append(this.controlBlock);this.controlBlock.appendChild(this.checkAllbox());check_all_label=this.make('label',{},'All/None');$o(check_all_label).bind('click',function(){return $o(_this.checkAllBox).trigger('click');});this.controlBlock.appendChild(check_all_label);this.overlaysListBlock=this.make('div',{"class":'overlays-list'});$o(this.el).append(this.overlaysListBlock);return $o(this.el).append(this.dynamicAddsBlock());};ImagesManagementDiv.prototype.append=function(block){return this.overlaysListBlock.appendChild(block);};ImagesManagementDiv.prototype.del=function(image_id){$o(".overlay-image-block[data-img-id="+image_id+"]",this.el).remove();return $o("#overlay_me_images_container #"+image_id).remove();};ImagesManagementDiv.prototype.dynamicAddsBlock=function(){var dynamicAddsBlock,push_image_button,_this=this;dynamicAddsBlock=this.make('div',{"class":'dynamic-adds'});dynamicAddsBlock.appendChild(this.make('label',{},'Add image'));this.image_url_input=this.make('input',{type:'text',placeholder:"http://"});dynamicAddsBlock.appendChild(this.image_url_input);push_image_button=this.make('button',{},'+');dynamicAddsBlock.appendChild(push_image_button);$o(this.image_url_input).bind('keypress',function(e){if(e.keyCode===13){return _this.pushImage();}});$o(push_image_button).bind('click',function(e){return _this.pushImage();});return dynamicAddsBlock;};ImagesManagementDiv.prototype.pushImage=function(){OverlayMe.dyn_manager.addImage(this.image_url_input.value);return this.image_url_input.value='';};ImagesManagementDiv.prototype.checkAllbox=function(){var _this=this;this.checkAllBox=this.make('input',{type:"checkbox","class":'check-all'});$o(this.checkAllBox).bind('change',function(event){return _this.checkAll();});return this.checkAllBox;};ImagesManagementDiv.prototype.checkAll=function(){var checkbox,checkbox_state,_i,_len,_ref;checkbox_state=this.checkAllBox.checked;_ref=$o('.overlay-image-block input[type=checkbox]');for(_i=0,_len=_ref.length;_i<_len;_i++){checkbox=_ref[_i];if(checkbox.checked!==checkbox_state){$o(checkbox).trigger('click');}}
740
- return this.saveState();};ImagesManagementDiv.prototype.saveState=function(){};ImagesManagementDiv.prototype.render=function(){return this.el;};return ImagesManagementDiv;})(Backbone.View);}).call(this);(function(){var overlay_panel;if(OverlayMe.mustLoad()){overlay_panel=new OverlayMe.MenuItem({id:"overlay_panel",title:"Overlays"});overlay_panel.append(new OverlayMe.Overlays.ContentDivManagementBlock().render());OverlayMe.images_management_div=new OverlayMe.Overlays.ImagesManagementDiv();overlay_panel.append(OverlayMe.images_management_div.render());OverlayMe.menu.append(overlay_panel.render());$o(window).bind('mousemove',function(event){return $o(window).trigger('mymousemove',event);});OverlayMe.dyn_manager=new OverlayMe.Overlays.DynamicManager();OverlayMe.dyn_manager.loadAll();OverlayMe.loadDefaultImage=function(){if(OverlayMe.dyn_manager.isEmpty()){return OverlayMe.dyn_manager.addImage('https://a248.e.akamai.net/assets.github.com/images/modules/about_page/octocat.png');}};$o.ajax({url:'/overlay_images',dataType:'json',success:function(data){if(data.length===0){return OverlayMe.loadDefaultImage();}else{return $o.each(data,function(index,img_path){return OverlayMe.images_management_div.append(new OverlayMe.Overlays.Image(img_path).render());});}},error:function(){return OverlayMe.loadDefaultImage();}});}}).call(this);(function(){window.overlay_me_loaded=true;}).call(this);
757
+ ImagesManagementDiv.prototype.tagName='fieldset';ImagesManagementDiv.prototype.id='images_mgnt';ImagesManagementDiv.prototype.initialize=function(){$o(this.el).append(this.make('legend',{},'Overlaying images'));this.overlaysListBlock=this.make('div',{"class":'overlays-list'});$o(this.el).append(this.overlaysListBlock);return $o(this.el).append(this.dynamicAddsBlock());};ImagesManagementDiv.prototype.append=function(block){return this.overlaysListBlock.appendChild(block);};ImagesManagementDiv.prototype.del=function(image_id){$o(".overlay-image-block[data-img-id="+image_id+"]",this.el).remove();return $o("#overlay_me_images_container #"+image_id).remove();};ImagesManagementDiv.prototype.dynamicAddsBlock=function(){var dynamicAddsBlock,push_image_button,_this=this;dynamicAddsBlock=this.make('div',{"class":'dynamic-adds'});dynamicAddsBlock.appendChild(this.make('label',{},'Add image'));this.image_url_input=this.make('input',{type:'text',placeholder:"http://"});dynamicAddsBlock.appendChild(this.image_url_input);push_image_button=this.make('button',{},'+');dynamicAddsBlock.appendChild(push_image_button);$o(this.image_url_input).bind('keypress',function(e){if(e.keyCode===13){return _this.pushImage();}});$o(push_image_button).bind('click',function(e){return _this.pushImage();});return dynamicAddsBlock;};ImagesManagementDiv.prototype.pushImage=function(){OverlayMe.dyn_manager.addImage(this.image_url_input.value);return this.image_url_input.value='';};ImagesManagementDiv.prototype.render=function(){return this.el;};return ImagesManagementDiv;})(Backbone.View);}).call(this);(function(){var buildTree,displayTree,files_tree,overlay_panel,shiftTofiles;if(OverlayMe.mustLoad()){overlay_panel=new OverlayMe.MenuItem({id:"overlay_panel",title:"Overlays"});overlay_panel.append(new OverlayMe.Overlays.ContentDivManagementBlock().render());OverlayMe.images_management_div=new OverlayMe.Overlays.ImagesManagementDiv();overlay_panel.append(OverlayMe.images_management_div.render());OverlayMe.menu.append(overlay_panel.render());$o(window).bind('mousemove',function(event){return $o(window).trigger('mymousemove',event);});OverlayMe.dyn_manager=new OverlayMe.Overlays.DynamicManager();OverlayMe.dyn_manager.loadAll();OverlayMe.loadDefaultImage=function(){if(OverlayMe.dyn_manager.isEmpty()){return OverlayMe.dyn_manager.addImage('https://a248.e.akamai.net/assets.github.com/images/modules/about_page/octocat.png');}};$o.ajax({url:'/overlay_images',dataType:'json',success:function(data){if(data.length===0){return OverlayMe.loadDefaultImage();}else{return buildTree(data);}},error:function(){return OverlayMe.loadDefaultImage();}});files_tree={};buildTree=function(data){$o.each(data,function(index,img_path){var bit,bits,parent_path,position,_results;bits=img_path.split('/');position=files_tree;parent_path='/';_results=[];while(bits.length>0){bit=bits[0];bits=bits.slice(1);if(bit===""){continue;}
758
+ parent_path+=bit+'/';if(position[bit]===void 0){if(bits.length>0){position[bit]={parent_path:parent_path};}else{if(position['files']===void 0){position['files']=[];}
759
+ position['files'].push(bit);}}
760
+ _results.push(position=position[bit]);}
761
+ return _results;});files_tree=shiftTofiles(files_tree);return displayTree(OverlayMe.images_management_div,files_tree);};shiftTofiles=function(tree){var keys;if(tree.files){return tree;}
762
+ keys=Object.keys(tree);if(keys.length>2){return tree;}
763
+ keys=_.without(keys,'parent_path');return shiftTofiles(tree[keys[0]]);};displayTree=function(parent,tree){var dir,img,sub_dir,_i,_j,_len,_len1,_ref,_ref1,_results;_ref=Object.keys(tree);for(_i=0,_len=_ref.length;_i<_len;_i++){dir=_ref[_i];if(dir==='files'||dir==='parent_path'){continue;}
764
+ sub_dir=new OverlayMe.Overlays.ImagesDirectory(dir);parent.append(sub_dir.render());displayTree(sub_dir,tree[dir]);}
765
+ if(tree.files){_ref1=tree.files;_results=[];for(_j=0,_len1=_ref1.length;_j<_len1;_j++){img=_ref1[_j];_results.push(parent.append(new OverlayMe.Overlays.Image(tree.parent_path+img,{parent_path:tree.parent_path}).render()));}
766
+ return _results;}};}}).call(this);(function(){window.overlay_me_loaded=true;}).call(this);
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: overlay_me
3
3
  version: !ruby/object:Gem::Version
4
- hash: 45
4
+ hash: 43
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 12
9
- - 1
10
- version: 0.12.1
8
+ - 13
9
+ - 0
10
+ version: 0.13.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Joseph Boiteau
@@ -15,8 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-05-25 00:00:00 +10:00
19
- default_executable:
18
+ date: 2012-06-14 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: rake
@@ -133,7 +132,6 @@ files:
133
132
  - LICENSE
134
133
  - README.md
135
134
  - Rakefile
136
- - demo_page.html
137
135
  - javascripts/addons/layout_resizer.js.coffee
138
136
  - javascripts/basics.js.coffee
139
137
  - javascripts/draggable.js.coffee
@@ -153,6 +151,7 @@ files:
153
151
  - javascripts/overlays/dynamic_images_mngmt.js.coffee
154
152
  - javascripts/overlays/image.js.coffee
155
153
  - javascripts/overlays/images_container.js.coffee
154
+ - javascripts/overlays/images_directory.js.coffee
156
155
  - javascripts/overlays/images_mngt_div.js.coffee
157
156
  - javascripts/overlays/init.js.coffee
158
157
  - lib/overlay_me.rb
@@ -163,7 +162,6 @@ files:
163
162
  - stylesheets/overlay_me.css.scss
164
163
  - vendor/assets/javascripts/overlay_me/addons/layout_resizer.js
165
164
  - vendor/assets/javascripts/overlay_me/overlay_me.min.js
166
- has_rdoc: true
167
165
  homepage: http://github.com/frontfoot/overlay_me
168
166
  licenses: []
169
167
 
@@ -193,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
191
  requirements: []
194
192
 
195
193
  rubyforge_project:
196
- rubygems_version: 1.6.2
194
+ rubygems_version: 1.8.24
197
195
  signing_key:
198
196
  specification_version: 3
199
197
  summary: A handy toolbox for your web development
data/demo_page.html DELETED
@@ -1,33 +0,0 @@
1
- <html>
2
- <head>
3
- <style type="text/css">
4
- a.this_link {
5
- display: inline-block;
6
- width: 75px;
7
- vertical-align: bottom;
8
- height: 18px;
9
- }
10
- a.this_link:before {
11
- content: "this link";
12
- text-align: center;
13
- text-decoration: underline;
14
- background: white;
15
- width: 75px;
16
- height: 18px;
17
- position: absolute;
18
- }
19
- </style>
20
- </head>
21
- <body>
22
- <div id="container">
23
-
24
- <h2>OverlayMe bookmarklet</h2>
25
-
26
- <p>Drag and drop <a class="this_link" href="javascript:(function(){if(!window.overlay_me_loaded){document.body.appendChild(document.createElement('script')).src='https://raw.github.com/frontfoot/overlay_me/master/vendor/assets/javascripts/overlay_me/overlay_me.min.js';}})();">overlay_me</a> to your bookmarks, then go on any web page and click it!</p>
27
-
28
- <p>Full project here: <a href="https://github.com/frontfoot/overlay_me">https://github.com/frontfoot/overlay_me</a></p>
29
-
30
- </div>
31
- </body>
32
- </html>
33
-