Author: marvintriebel
Date: Fri Jun 13 11:41:02 2014
New Revision: 9582
URL: http://svn.gna.org/viewcvs/service-tech?rev=9582&view=rev
Log:
typo fix
Added:
trunk/_meta/live2/frontend/fancy/js/util.js
Modified:
trunk/_meta/live2/frontend/fancy/index.html
trunk/_meta/live2/frontend/fancy/js/formatOutput.js
trunk/_meta/live2/frontend/fancy/js/init.js
Modified: trunk/_meta/live2/frontend/fancy/index.html
URL:
http://svn.gna.org/viewcvs/service-tech/trunk/_meta/live2/frontend/fancy/index.html?rev=9582&r1=9581&r2=9582&view=diff
==============================================================================
--- trunk/_meta/live2/frontend/fancy/index.html (original)
+++ trunk/_meta/live2/frontend/fancy/index.html Fri Jun 13 11:41:02 2014
@@ -121,6 +121,7 @@
<script src="lib/viz.js"></script>
<!-- load js files-->
+ <script src="js/util.js"></script>
<script src="js/fancy.js"></script>
<script src="js/fileExplorer.js"></script>
<script src="js/inputs.js"></script>
Modified: trunk/_meta/live2/frontend/fancy/js/formatOutput.js
URL:
http://svn.gna.org/viewcvs/service-tech/trunk/_meta/live2/frontend/fancy/js/formatOutput.js?rev=9582&r1=9581&r2=9582&view=diff
==============================================================================
--- trunk/_meta/live2/frontend/fancy/js/formatOutput.js (original)
+++ trunk/_meta/live2/frontend/fancy/js/formatOutput.js Fri Jun 13 11:41:02 2014
@@ -53,7 +53,7 @@
noRec = 0;
// append this modal to body
-$(document.body).appendChild($(htmlModal));
+$(document.body).append($(htmlModal));
/** handle an error and output an alert
* @method errorHandler
Modified: trunk/_meta/live2/frontend/fancy/js/init.js
URL:
http://svn.gna.org/viewcvs/service-tech/trunk/_meta/live2/frontend/fancy/js/init.js?rev=9582&r1=9581&r2=9582&view=diff
==============================================================================
--- trunk/_meta/live2/frontend/fancy/js/init.js (original)
+++ trunk/_meta/live2/frontend/fancy/js/init.js Fri Jun 13 11:41:02 2014
@@ -15,18 +15,9 @@
(function(location, $, FILE_EXPLORER, HISTORY, INPUT_MANAGER, JSON_BOX) { //
scope wrap
"use strict";
-// fix for chrome+safari#
-$.fn.prettyVal = function() {
- var v = this.val();
- if(typeof v !== "string") {
- return "";
- }
- return this.val().replace(/^.*[\\\/]/g, "");
-};
-
// read the input hash
// put to global scope
-var init, call = location.search.replace(/init=([^\&]*)/gi, "");
+var tool, init, call = location.search.replace(/init=([^\&]*)/gi, "");
call = decodeURIComponent(call.replace(/^\?/, ""));
init = decodeURIComponent(RegExp.$1);
// no XSS:
Added: trunk/_meta/live2/frontend/fancy/js/util.js
URL:
http://svn.gna.org/viewcvs/service-tech/trunk/_meta/live2/frontend/fancy/js/util.js?rev=9582&view=auto
==============================================================================
--- trunk/_meta/live2/frontend/fancy/js/util.js (added)
+++ trunk/_meta/live2/frontend/fancy/js/util.js Fri Jun 13 11:41:02 2014
@@ -0,0 +1,63 @@
+/**
+ * this class provides some helper functions
+ * it is complete private, as it only registers some functions on
+ * objects/prototypes
+ *
+ * @class util
+ * @private @static
+ *
+ * @requires jQuery
+ *
+ */
+(function($){
+ // fix for chrome+safari#
+ $.fn.prettyVal = function() {
+ var v = this.val();
+ if(typeof v !== "string") {
+ return "";
+ }
+ return this.val().replace(/^.*[\\\/]/g, "");
+ };
+
+// From
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
+if (!Object.keys) {
+ Object.keys = (function () {
+ "use strict";
+ var hasOwnProperty = Object.prototype.hasOwnProperty,
+ hasDontEnumBug = !({toString: null}).propertyIsEnumerable("toString"),
+ dontEnums = [
+ "toString",
+ "toLocaleString",
+ "valueOf",
+ "hasOwnProperty",
+ "isPrototypeOf",
+ "propertyIsEnumerable",
+ "constructor"
+ ],
+ dontEnumsLength = dontEnums.length;
+
+ return function (obj) {
+ if (typeof obj !== "object" && (typeof obj !== "function" || obj ===
null)) {
+ throw new TypeError("Object.keys called on non-object");
+ }
+
+ var result = [], prop, i;
+
+ for (prop in obj) {
+ if (hasOwnProperty.call(obj, prop)) {
+ result.push(prop);
+ }
+ }
+
+ if (hasDontEnumBug) {
+ for (i = 0; i < dontEnumsLength; i++) {
+ if (hasOwnProperty.call(obj, dontEnums[i])) {
+ result.push(dontEnums[i]);
+ }
+ }
+ }
+ return result;
+ };
+ }());
+}
+})($);
--
You received this e-mail, because you subscribed the mailing list
"service-tech-commits" which will forward you any e-mail addressed to
[email protected]. If you want to unsubscribe or make any changes to
your subscription, please go to
https://mail.gna.org/listinfo/service-tech-commits.