This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/*global document */ | |
/** | |
* define document.querySelector & document.querySelectorAll for IE7 | |
* | |
* A not very fast but small hack. The approach is taken from | |
* http://weblogs.asp.net/bleroy/archive/2009/08/31/queryselectorall-on-old-ie-versions-something-that-doesn-t-work.aspx | |
* | |
*/ | |
/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// window.location parameter convert to JSON | |
var | |
param = {}, | |
parameter = window.location.search.replace(/^\?/, '').split(/&/g), | |
i = parameter.length, pidx; | |
while(i--){ | |
param[ parameter[i].substr(0, pidx = parameter[i].indexOf("=")) ] = | |
parameter[i].substr( pidx + 1 ); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var iiac_cat_options = []; | |
$("#itemMapCd").bindSelector({ | |
appendable:false, | |
//options: options, | |
onsearch: function(objID, objVal) { | |
var options = []; | |
if(objVal == ""){ | |
options = [].concat(iiac_cat_options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title></title> | |
<script> | |
var db_name = "chequer", db_version = 1; | |
var idb = (function(){ | |
var indexedDB = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
e = e || window.event; | |
var target = axf.get_event_target(e.target, function(el){ | |
if(axdom(el).hasClass("AXTag-selector-tagitem-remove")){ | |
event_type = "remove"; | |
return true; | |
} | |
else | |
if(axdom(el).hasClass("AXTag-selector-tagitem")){ | |
event_type = "item"; | |
return true; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this.els["control"].bind("click", function (e) { | |
e = e || window.event; | |
var btn_value; | |
var target = axf.get_event_target(e.target, function (el) { | |
if ('getAttribute' in el) { | |
if (btn_value = el.getAttribute("data-els-btn")) { | |
return true; | |
} | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var stDtTime = ax5.util.date(data.rsvtStDt).getTime(); | |
var endDtTime = ax5.util.date(data.rsvtEndDt).getTime(); | |
for(var _d = stDtTime; _d <= endDtTime; _d = _d + (1000*60*60*24)){ | |
console.log( _d, new Date(_d)); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var url_string = "https://lh3.googleusercontent.com/-6z6mZ1jCGoA/VhVvM9dr_6I/AAAAAAAAVwU/djxcLHi-KLY/Ic42/IMG_2553.jpg"; | |
console.log(url_string); | |
url_string = url_string.replace(/(\w*)[\\\/]\w*\.\w*$/, function(match, folder){ | |
return folder + '-thomas' + match.substr(folder.length); | |
}); | |
console.log(url_string); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
exports.render = function(input, out) { | |
var _s = ""; | |
var _out = { | |
w: function(text) { | |
var text_array = text.split(/\n/g); | |
if (text_array.length > 0) { | |
var find_first_line = false, i = 0; | |
while (!find_first_line) { | |
if (text_array[i] != '') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function () { | |
var console = window.console; | |
if (!console) return; | |
function intercept(method) { | |
var original = console[method]; | |
console[method] = function () { | |
// do sneaky stuff | |
if (original.apply) { | |
// Do this for normal browsers |
OlderNewer