]> iEval git - gruntmaster-page.git/commitdiff
Merge branch 'master' into newmc
authorMarius Gavrilescu <marius@ieval.ro>
Sun, 8 Mar 2015 10:17:15 +0000 (12:17 +0200)
committerMarius Gavrilescu <marius@ieval.ro>
Sun, 8 Mar 2015 10:17:15 +0000 (12:17 +0200)
Conflicts:
Makefile.PL
make_static.PL

MANIFEST
Makefile.PL
css/themes/cyborg.css
css/themes/readable.css
css/themes/slate.css
js/00-zepto.js
js/01-zepto-jquery.js [deleted file]
js/10-bootstrap-modal.js
lib/Plack/App/Gruntmaster.pm
make_static.PL

index 3ab2474ca95cde27127a5b9a45fd2fcc5b47142d..8c47140035f488e8cdf70fc8e2e3155b81ab8686 100644 (file)
--- a/MANIFEST
+++ b/MANIFEST
@@ -13,7 +13,6 @@ css/themes/cyborg.css
 css/themes/readable.css
 css/themes/slate.css
 js/00-zepto.js
-js/01-zepto-jquery.js
 js/10-bootstrap-modal.js
 js/20-sprintf.js
 js/80-sidebar.js
index c6d91a7941b776c7dff59e561878c6654affd84d..2b025b150581082049e9a4feb1d00aa7673a47c7 100644 (file)
@@ -10,7 +10,7 @@ WriteMakefile(
        LICENSE           => 'AGPL_3',
        SIGN              => 1,
        clean             => {
-               FILES => 'static/css/ static/js.js css/logos.css static/logos.png'
+               FILES => 'static/css/ static/js.js css/logos.css static/logos.png static/js.map static/js/'
        },
        BUILD_REQUIRES    => {
                qw/CSS::Minifier::XS          0
index dc80cd21580fbf36af33902653b0ab1a3e751362..5d80614ecda48817dd5896f7eab40ce5ca63237f 100644 (file)
@@ -1896,6 +1896,31 @@ tbody.collapse.in {
   padding: 9px;
   border-radius: 3px;
 }
+.close {
+  float: right;
+  font-size: 21px;
+  font-weight: bold;
+  line-height: 1;
+  color: #000000;
+  text-shadow: 0 1px 0 #ffffff;
+  opacity: 0.2;
+  filter: alpha(opacity=20);
+}
+.close:hover,
+.close:focus {
+  color: #000000;
+  text-decoration: none;
+  cursor: pointer;
+  opacity: 0.5;
+  filter: alpha(opacity=50);
+}
+button.close {
+  padding: 0;
+  cursor: pointer;
+  background: transparent;
+  border: 0;
+  -webkit-appearance: none;
+}
 .modal-open {
   overflow: hidden;
 }
index 2de3950999b374400bed1a78a8a87fb43b437bb3..14c47d663a99018657b8c9ecd9f58b6f9a06dc85 100644 (file)
@@ -1896,6 +1896,31 @@ tbody.collapse.in {
   padding: 9px;
   border-radius: 3px;
 }
+.close {
+  float: right;
+  font-size: 24px;
+  font-weight: bold;
+  line-height: 1;
+  color: #ffffff;
+  text-shadow: 0 1px 0 #ffffff;
+  opacity: 0.2;
+  filter: alpha(opacity=20);
+}
+.close:hover,
+.close:focus {
+  color: #ffffff;
+  text-decoration: none;
+  cursor: pointer;
+  opacity: 0.5;
+  filter: alpha(opacity=50);
+}
+button.close {
+  padding: 0;
+  cursor: pointer;
+  background: transparent;
+  border: 0;
+  -webkit-appearance: none;
+}
 .modal-open {
   overflow: hidden;
 }
index ddd8dc98cb25e73ba04db5dafa976d75aa4bd19b..7e9ac71bb499f8a900e4213d71e363cff1bc3ed2 100644 (file)
@@ -1896,6 +1896,31 @@ tbody.collapse.in {
   padding: 9px;
   border-radius: 3px;
 }
+.close {
+  float: right;
+  font-size: 21px;
+  font-weight: bold;
+  line-height: 1;
+  color: #000000;
+  text-shadow: 0 1px 0 #ffffff;
+  opacity: 0.2;
+  filter: alpha(opacity=20);
+}
+.close:hover,
+.close:focus {
+  color: #000000;
+  text-decoration: none;
+  cursor: pointer;
+  opacity: 0.5;
+  filter: alpha(opacity=50);
+}
+button.close {
+  padding: 0;
+  cursor: pointer;
+  background: transparent;
+  border: 0;
+  -webkit-appearance: none;
+}
 .modal-open {
   overflow: hidden;
 }
index aa969f9fdadd29c011ae077115bb0e5604f522e7..76726cd7c89279639d3dcda485ec63849f7c5505 100644 (file)
@@ -1,4 +1,4 @@
-/* Zepto v1.1.4-13-geba5344 - zepto event data ie - zeptojs.com/license */
+/* Zepto v1.1.4-80-ga9184b2 - zepto event data ie - zeptojs.com/license */
 
 var Zepto = (function() {
   var undefined, key, $, classList, emptyArray = [], concat = emptyArray.concat, filter = emptyArray.filter, slice = emptyArray.slice,
@@ -254,11 +254,11 @@ var Zepto = (function() {
         maybeClass = !maybeID && selector[0] == '.',
         nameOnly = maybeID || maybeClass ? selector.slice(1) : selector, // Ensure that a 1 char tag name still gets checked
         isSimple = simpleSelectorRE.test(nameOnly)
-    return (isDocument(element) && isSimple && maybeID) ?
+    return (element.getElementById && isSimple && maybeID) ? // Safari DocumentFragment doesn't have getElementById
       ( (found = element.getElementById(nameOnly)) ? [found] : [] ) :
-      (element.nodeType !== 1 && element.nodeType !== 9) ? [] :
+      (element.nodeType !== 1 && element.nodeType !== 9 && element.nodeType !== 11) ? [] :
       slice.call(
-        isSimple && !maybeID ?
+        isSimple && !maybeID && element.getElementsByClassName ? // DocumentFragment doesn't have getElementsByClassName/TagName
           maybeClass ? element.getElementsByClassName(nameOnly) : // If it's simple, it could be a class
           element.getElementsByTagName(selector) : // Or a tag
           element.querySelectorAll(selector) // Or it's not simple, and we need to query all
@@ -305,13 +305,12 @@ var Zepto = (function() {
   // JSON    => parse if valid
   // String  => self
   function deserializeValue(value) {
-    var num
     try {
       return value ?
         value == "true" ||
         ( value == "false" ? false :
           value == "null" ? null :
-          !/^0/.test(value) && !isNaN(num = Number(value)) ? num :
+          +value + "" == value ? +value :
           /^[\[\{]/.test(value) ? $.parseJSON(value) :
           value )
         : value
@@ -345,6 +344,7 @@ var Zepto = (function() {
   $.uuid = 0
   $.support = { }
   $.expr = { }
+  $.noop = function() {}
 
   $.map = function(elements, callback){
     var value, values = [], i, key
@@ -490,7 +490,7 @@ var Zepto = (function() {
     },
     find: function(selector){
       var result, $this = this
-      if (!selector) result = []
+      if (!selector) result = $()
       else if (typeof selector == 'object')
         result = $(selector).filter(function(){
           var node = this
@@ -527,7 +527,7 @@ var Zepto = (function() {
       return filtered(this.map(function(){ return children(this) }), selector)
     },
     contents: function() {
-      return this.map(function() { return slice.call(this.childNodes) })
+      return this.map(function() { return this.contentDocument || slice.call(this.childNodes) })
     },
     siblings: function(selector){
       return filtered(this.map(function(i, el){
@@ -676,6 +676,8 @@ var Zepto = (function() {
         $this.css(props)
       })
       if (!this.length) return null
+      if (!$.contains(document.documentElement, this[0]))
+        return {top: 0, left: 0}
       var obj = this[0].getBoundingClientRect()
       return {
         left: obj.left + window.pageXOffset,
@@ -686,8 +688,9 @@ var Zepto = (function() {
     },
     css: function(property, value){
       if (arguments.length < 2) {
-        var element = this[0], computedStyle = getComputedStyle(element, '')
+        var computedStyle, element = this[0]
         if(!element) return
+        computedStyle = getComputedStyle(element, '')
         if (typeof property == 'string')
           return element.style[camelize(property)] || computedStyle.getPropertyValue(property)
         else if (isArray(property)) {
@@ -1078,7 +1081,7 @@ window.$ === undefined && (window.$ = Zepto)
 
     if (!isString(selector) && !isFunction(callback) && callback !== false)
       callback = data, data = selector, selector = undefined
-    if (isFunction(data) || data === false)
+    if (callback === undefined || data === false)
       callback = data, data = undefined
 
     if (callback === false) callback = returnFalse
@@ -1123,8 +1126,10 @@ window.$ === undefined && (window.$ = Zepto)
     event = (isString(event) || $.isPlainObject(event)) ? $.Event(event) : compatible(event)
     event._args = args
     return this.each(function(){
+      // handle focus(), blur() by calling them directly
+      if (event.type in focus && typeof this[event.type] == "function") this[event.type]()
       // items in the collection might not be DOM elements
-      if('dispatchEvent' in this) this.dispatchEvent(event)
+      else if ('dispatchEvent' in this) this.dispatchEvent(event)
       else $(this).triggerHandler(event, args)
     })
   }
@@ -1146,27 +1151,16 @@ window.$ === undefined && (window.$ = Zepto)
   }
 
   // shortcut methods for `.bind(event, fn)` for each event type
-  ;('focusin focusout load resize scroll unload click dblclick '+
+  ;('focusin focusout focus blur load resize scroll unload click dblclick '+
   'mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave '+
   'change select keydown keypress keyup error').split(' ').forEach(function(event) {
     $.fn[event] = function(callback) {
-      return callback ?
+      return (0 in arguments) ?
         this.bind(event, callback) :
         this.trigger(event)
     }
   })
 
-  ;['focus', 'blur'].forEach(function(name) {
-    $.fn[name] = function(callback) {
-      if (callback) this.bind(name, callback)
-      else this.each(function(){
-        try { this[name]() }
-        catch(e) {}
-      })
-      return this
-    }
-  })
-
   $.Event = function(type, props) {
     if (!isString(type)) props = type, type = props.type
     var event = document.createEvent(specialEvents[type] || 'Events'), bubbles = true
diff --git a/js/01-zepto-jquery.js b/js/01-zepto-jquery.js
deleted file mode 100644 (file)
index 1fe7da3..0000000
+++ /dev/null
@@ -1 +0,0 @@
-jQuery = Zepto;
index 93891aa4eb26b8fdeb1423c4dafdc3ab2432a99b..738129628f86faab13317950b73d7c5818979b15 100644 (file)
@@ -1,8 +1,8 @@
 /* ========================================================================
- * Bootstrap: modal.js v3.3.1
+ * Bootstrap: modal.js v3.3.2
  * http://getbootstrap.com/javascript/#modals
  * ========================================================================
- * Copyright 2011-2014 Twitter, Inc.
+ * Copyright 2011-2015 Twitter, Inc.
  * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
  * ======================================================================== */
 
@@ -30,7 +30,7 @@
     }
   }
 
-  Modal.VERSION  = '3.3.1'
+  Modal.VERSION  = '3.3.2'
 
   Modal.TRANSITION_DURATION = 300
   Modal.BACKDROP_TRANSITION_DURATION = 150
     Plugin.call($target, option, this)
   })
 
-}(jQuery);
+}(Zepto);
index 00f9b0f52c39d133f0e0903544e3283c634067fe..f32c606866244604e080ca7bfae792a4b4420d71 100644 (file)
@@ -153,7 +153,7 @@ sub dispatch_request{
                },
                sub (/pb/  + ?:owner~&:contest~&:private~)                  {
                        forbid $_{private};
-                       forbid contest->is_pending;
+                       forbid contest && contest->is_pending;
                        response pb => 'Problems', db->problem_list(%_)
                },
 
index 5594f75d81b12b19132918f1f06e4ef05b84a90d..01c61253138a804084ec2007469fa27b42ce884e 100644 (file)
@@ -39,9 +39,16 @@ for (<css/themes/*>) {
        write_file "static/css/$theme.css", CSS::Minifier::XS::minify $css;
 }
 
-my $js;
-$js .= read_file $_ for <js/*.js>;
-write_file 'static/js.js', JavaScript::Minifier::XS::minify $js;
+if (-f 'compiler.jar') {
+       system java => -jar => 'compiler.jar', qw,-O SIMPLE --create_source_map static/js.map --js_output_file static/js.js --language_in ECMASCRIPT5_STRICT --source_map_location_mapping js/|/static/js/,, <js/*>;
+       my $js = read_file 'static/js.js';
+       write_file 'static/js.js', '//# sourceMappingURL=/static/js.map', "\n", $js;
+       system 'cp', '-rp', 'js', 'static/';
+} else {
+       my $js;
+       $js .= read_file $_ for <js/*.js>;
+       write_file 'static/js.js', JavaScript::Minifier::XS::minify $js;
+}
 
 package
   Local::CSS::SpriteMaker;
This page took 0.039789 seconds and 4 git commands to generate.