Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Misc flashing

  • Loading branch information...
commit 0519ccd28e1865904d87f377cbb79e5f1053d37e 1 parent c75e6f7
@Artazor Artazor authored
Showing with 50 additions and 19 deletions.
  1. +46 −19 lib/js/oxygen.js
  2. +4 −0 object/object.class.php
View
65 lib/js/oxygen.js
@@ -69,33 +69,33 @@ a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^
* to offer multiple easing options
*
* TERMS OF USE - jQuery Easing
- *
- * Open source under the BSD License.
- *
+ *
+ * Open source under the BSD License.
+ *
* Copyright © 2008 George McGinley Smith
* All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without modification,
+ *
+ * Redistribution and use in source and binary forms, with or without modification,
* are permitted provided that the following conditions are met:
- *
- * Redistributions of source code must retain the above copyright notice, this list of
+ *
+ * Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice, this list
- * of conditions and the following disclaimer in the documentation and/or other materials
+ * Redistributions in binary form must reproduce the above copyright notice, this list
+ * of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
- *
- * Neither the name of the author nor the names of contributors may be used to endorse
+ *
+ * Neither the name of the author nor the names of contributors may be used to endorse
* or promote products derived from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
* MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
- * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
- * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
- * OF THE POSSIBILITY OF SUCH DAMAGE.
+ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
+ * OF THE POSSIBILITY OF SUCH DAMAGE.
*
*/
(function(jQuery){
@@ -108,6 +108,26 @@ jQuery.easing["jswing"]=jQuery.easing["swing"];jQuery.extend(jQuery.easing,{def:
window.oxygen.$ = jQuery.noConflict(true);
+// Converts a UTF-8 encoded string to ISO-8859-1
+//
+// version: 1109.2015
+// discuss at: http://phpjs.org/functions/utf8_decode
+// + original by: Webtoolkit.info (http://www.webtoolkit.info/)
+// + input by: Aman Gupta
+// + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
+// + improved by: Norman "zEh" Fuchs
+// + bugfixed by: hitwork
+// + bugfixed by: Onno Marsman
+// + input by: Brett Zamir (http://brett-zamir.me)
+// + bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
+// * example 1: utf8_decode('Kevin van Zonneveld');
+// * returns 1: 'Kevin van Zonneveld'
+(function(oxy){
+oxy.window = window;
+oxy.utf8_decode=function(a){var b=[],c=0,d=0,e=0,f=0,g=0;a+="";while(c<a.length){e=a.charCodeAt(c);if(e<128){b[d++]=String.fromCharCode(e);c++}else if(e>191&&e<224){f=a.charCodeAt(c+1);b[d++]=String.fromCharCode((e&31)<<6|f&63);c+=2}else{f=a.charCodeAt(c+1);g=a.charCodeAt(c+2);b[d++]=String.fromCharCode((e&15)<<12|(f&63)<<6|g&63);c+=3}}return b.join("")}
+oxy.unserialize = function(a){var b=oxy;var c=function(a){var b=a.charCodeAt(0);if(b<128){return 0}if(b<2048){return 1}return 2};var d=function(a,c,d,e){throw new b.window[a](c,d,e)};var e=function(a,b,c){var e=[];var f=a.slice(b,b+1);var g=2;while(f!=c){if(g+b>a.length){d("Error","Invalid")}e.push(f);f=a.slice(b+(g-1),b+g);g+=1}return[e.length,e.join("")]};var f=function(a,b,d){var e;e=[];for(var f=0;f<d;f++){var g=a.slice(b+(f-1),b+f);e.push(g);d-=c(g)}return[e.length,e.join("")]};var g=function(a,c){var h;var i;var j=0;var k;var l;var m;var n;if(!c){c=0}var o=a.slice(c,c+1).toLowerCase();var p=c+2;var q=function(a){return a};switch(o){case"i":q=function(a){return parseInt(a,10)};i=e(a,p,";");j=i[0];h=i[1];p+=j+1;break;case"b":q=function(a){return parseInt(a,10)!==0};i=e(a,p,";");j=i[0];h=i[1];p+=j+1;break;case"d":q=function(a){return parseFloat(a)};i=e(a,p,";");j=i[0];h=i[1];p+=j+1;break;case"n":h=null;break;case"s":k=e(a,p,":");j=k[0];l=k[1];p+=j+2;i=f(a,p+1,parseInt(l,10));j=i[0];h=i[1];p+=j+2;if(j!=parseInt(l,10)&&j!=h.length){d("SyntaxError","String length mismatch")}h=b.utf8_decode(h);break;case"a":h={};m=e(a,p,":");j=m[0];n=m[1];p+=j+2;for(var r=0;r<parseInt(n,10);r++){var s=g(a,p);var t=s[1];var u=s[2];p+=t;var v=g(a,p);var w=v[1];var x=v[2];p+=w;h[u]=x}p+=1;break;default:d("SyntaxError","Unknown / Unhandled data type(s): "+o);break}return[o,p-c,q(h)]};return g(a+"",0)[2]}
+})(window.oxygen);
+
// Underscore.js 1.3.3
// (c) 2009-2012 Jeremy Ashkenas, DocumentCloud Inc.
// Underscore is freely distributable under the MIT license.
@@ -121,9 +141,16 @@ window.oxygen.$ = jQuery.noConflict(true);
window.oxygen.each = _.each;
window.oxygen._ = _.noConflict();
window.oxygen.messages = [];
-window.oxygen.log = (typeof(console)==='object' && typeof(console.log)==='function') ? console.log : function(m){
- window.oxygen.messages.push(m);
-};
+if(typeof(console)==='object' && typeof(console.log)==='function'){
+ window.oxygen.log = function(m){
+ console.log(m);
+ }
+} else {
+ window.oxygen.log = function(m){
+ window.oxygen.messages.push(m);
+ }
+}
+
// Douglas Crockford's JSON.parse & JSON.stringify implementation
View
4 object/object.class.php
@@ -20,6 +20,10 @@ public function flash($message, $type = 'info') {
$this->scope->SESSION['oxygen-flash-messages'] = $messages;
}
+ public function clientLog($object){
+ $this->flash($object,'debug');
+ }
+
public function __call($method, $args) {
if($method=='download'){
echo 'HERE';
Please sign in to comment.
Something went wrong with that request. Please try again.