Skip to content

Commit

Permalink
Merge pull request #112 from jkowalleck/master
Browse files Browse the repository at this point in the history
removed debugger from template
  • Loading branch information
jkowalleck authored Oct 10, 2019
2 parents eb3926a + 59acb71 commit 686d0c8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
19 changes: 9 additions & 10 deletions templates.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,15 @@
if ( ! obj ) { return; } if ( obj.dispatchEvent ) { obj.dispatchEvent(new Event(event)); } else {
obj.fireEvent("on" + event); } }, storageFactory : function () { try { var ls = window.localStorage; var lst = "test";
ls.setItem(lst, lst); if (lst != ls.getItem(lst)) { throw "ls.getItem"; } ls.removeItem(lst); return ls; } catch (e) {
debugger; return { _store : {} , setItem : function (k,v) { this._store[k]=v; }
, getItem : function (k) { return this._store[k]; } }; } } };</script><script type="application/javascript">;
(function (pub, win) { "use strict"; var log = window.helperFuncs.log; var vars , func , conf
, doc = win.document , math = win.Math ; conf = { imgMaxWidthPerc : 0.9 , imgMaxHeightPerc : 0.9 }; vars = {
styleE : null , cssSelector : "" }; func = { createStyle : function () { var styleE , base; if ( ! base ) {
base = doc.getElementsByTagName("head")[0]; } if ( ! base ) { base = doc.getElementsByTagName("body")[0]; } if ( ! base )
{ base = doc.getElementsByTagName("html")[0]; } if ( ! base ) { base = doc.lastChild; }
styleE = doc.createElement("style"); styleE.setAttribute("type","text/css"); styleE = base.appendChild(styleE);
return styleE; } , getAdjustmentStr : function () { var maxWidth , maxHeight , cssSelector = vars.cssSelector
, cssString = "" , style = {}; if ( ! cssSelector ) { return ""; }
return { _store : {} , setItem : function (k,v) { this._store[k]=v; } , getItem : function (k) { return this._store[k]; }
}; } } };</script><script type="application/javascript">; (function (pub, win) { "use strict";
var log = window.helperFuncs.log; var vars , func , conf , doc = win.document , math = win.Math ; conf = {
imgMaxWidthPerc : 0.9 , imgMaxHeightPerc : 0.9 }; vars = { styleE : null , cssSelector : "" }; func = {
createStyle : function () { var styleE , base; if ( ! base ) { base = doc.getElementsByTagName("head")[0]; }
if ( ! base ) { base = doc.getElementsByTagName("body")[0]; } if ( ! base ) { base = doc.getElementsByTagName("html")[0];
} if ( ! base ) { base = doc.lastChild; } styleE = doc.createElement("style"); styleE.setAttribute("type","text/css");
styleE = base.appendChild(styleE); return styleE; } , getAdjustmentStr : function () { var maxWidth , maxHeight
, cssSelector = vars.cssSelector , cssString = "" , style = {}; if ( ! cssSelector ) { return ""; }
maxWidth = math.floor(win.innerWidth * conf.imgMaxWidthPerc);
maxHeight = math.floor(win.innerHeight * conf.imgMaxHeightPerc); if ( maxWidth > 0 ) {
style["max-width"] = maxWidth +"px"; style["width"] = "auto"; } if ( maxHeight > 0 ) {
Expand Down
1 change: 0 additions & 1 deletion templates_raw/root/js/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ window.helperFuncs = {
}
catch (e)
{
debugger;
return { // temp storage to emulate local storage in dev mode
// only needed functions are implemented
_store : {}
Expand Down

0 comments on commit 686d0c8

Please sign in to comment.