diff --git a/README.md b/README.md index 26b61ab..79fbdaf 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ comix-ngn is **venue** - This class marks an element as a place for a stage to be imported. These are preferably divs. If the element does not have an id, it is given one automatically. ## Changelog -### comix-ngn version 1.8.5 (beta) +### comix-ngn version 1.9.2 (beta) **0.5.0**: Initial Setup, Version tracking **0.7.58**: Added Dependencies (JS): (jquery.min, angular-touch.min, angular.min[Update],bootstrap.min), Carousel for slides, real-time reactivity @@ -127,7 +127,12 @@ attribute to preload images but not implemented yet **1.9.0**: Main file size reduced from 37.051 kB -> 25.56 kB, swipe replaced with direction, stage has been refactored into a constructor, script spec upgraded to v2, load speed appears slower but is still under 200 ms, new plug in added: swip.cng.js, code clean up and organization, direction handles preloading, but router needs to be re-enabled, stageinjection now simply wraps the constructor, need to add app page functionality however. -### comix-ngn Writer version 1.0.0 (beta) +**1.9.1** App pages added + +**1.9.2** Major bugfixes, including null and undefined property checking +* addendum: bugfixes on direction js, properties are now more clear + +### comix-ngn Writer version 1.1.0 (beta) **0.5.0**: "Initial Setup, Versioning **0.8.0**: Huge implementations, Object config by dynamic form injection for Page and Chapter, Setting config compartmentalized, design config added @@ -136,7 +141,9 @@ attribute to preload images but not implemented yet **0.9.6**: pyoofreader gets its own version, continue config fully implemented, cosmetic changes, now able to download a stage and a template index.html -**1.0.0**: Ready for beta, +**1.0.0**: Ready for beta + +**1.1.0**: Setup for refactoring, all JS re-specified and deferred, js enclosed in closure ### comix-ngn Pyoofreader Version 0.1.0 (beta) **0.1.0**: Implemented version, counts page dif and warns of Mismatch \ No newline at end of file diff --git a/apptest.html b/apptest.html new file mode 100644 index 0000000..dccc222 --- /dev/null +++ b/apptest.html @@ -0,0 +1,13 @@ +App Test + + + +
+
app 1
+
+
+
+
\ No newline at end of file diff --git a/comixngn.js b/comixngn.js index 6e7210e..4ccfaf6 100644 --- a/comixngn.js +++ b/comixngn.js @@ -1,4 +1,4 @@ -/** @preserve comix-ngn v1.9.0 | (c) 2015 Oluwaseun Ogedengbe| seun40.github.io/comic-ng/ |License: MIT| +/** @preserve comix-ngn v1.9.2 | (c) 2015 Oluwaseun Ogedengbe| seun40.github.io/comic-ng/ |License: MIT| embeds domReady: github.com/ded/domready (MIT) (c) 2013 Dustin Diaz, pegasus: typicode.github.io/pegasus (MIT) (c) 2014 typicode, pathjs (MIT) (c) 2011 Mike Trpcic, direction.js*/ var cG = cG||{};/*if(void 0===cG) var cG = {};*//*check if cG is already is instantiated*/ @@ -9,7 +9,7 @@ function N(){return 0};/*null function*/ if(void 0===$GPC){var $GPC=0;} cG.root = ''; cG.cPanel = cG.panel||{}; -cG.info = {vix: "1.9.0",vwr: "1.0.0",vpr: "0.1.0"}; +cG.info = {vix: "1.9.2",vwr: "1.2.0",vpr: "0.1.0"}; /*rollbar*/ var _rollbarConfig = _rollbarConfig||{ accessToken: "3e8e8ecb63a04b5798e1d02adf2608cb", @@ -79,38 +79,17 @@ cG.REPO.producer = {"def":N}; /////// cG.REPO.stage = {"def":{id:"def",construct:function(name,scriptt,anchor,options){ - //workaround for v1->v2 -/* var spec={chapters:[{description:"",end:0,start:0,title:""}],config:{chapterstartnum:!1,dir:"assets/",imgpostbuffer:5,imgprebuffer:5,pagestartnum:!1,startpage:0},loading:{height:250,lines:16,rate:33.333333333333336,width:250,xpos:.5,ypos:.5,back:"#FFF",color:"#373737"},offset:0,pages:[{alt:"",anim8:!1,hover:"",note:"",perm:!1,release:0,title:"",url:[""]}],parent:null,pyr:{appendmismatch:!1,appendorder:0,appendorderdir:!1}}, - glue = function(model,fix){ - var keys = Object.keys(model); - for(var u in keys){ - //console.log(fix[keys[u]]); - if((fix[keys[u]]===void 0)||(typeof fix[keys[u]] !== typeof model[keys[u]])&&keys[u]!="url") fix[keys[u]] = model[keys[u]]; - else if(typeof fix[keys[u]] === 'object'){ - if(model[keys[u]] != null){ - if(fix[keys[u]].length<=0) continue; - else if(Array.isArray(fix[keys[u]])&&fix[keys[u]].length>0){ - glue(model[keys[u]],fix[keys[u]]) - } - else glue(model[keys[u]],fix[keys[u]]); - } - } - } - return fix; - }*/ - // - var direction=function(d,l){if(void 0===d)return-1;if("string"===typeof d)d={parent:null,offset:0,loading:{lines:16,rate:1E3/30,width:250,height:250,xpos:.5,ypos:.5,back:"#FFF",color:"#373737"},config:{dir:"assets/",pagestartnum:!1,chapterstartnum:!1,imgprebuffer:5,imgpostbuffer:5,startpage:0,back:"#FFF"},pages:[{alt:"",hover:"",title:"",url:[d],release:0,note:"",perm:!1,anim8:!1}],chapters:[]};else if(Array.isArray(d)){for(var m={parent:null,offset:0,loading:{lines:16,rate:1E3/30,width:250,height:250, -xpos:.5,ypos:.5,back:"#FFF",color:"#373737"},config:{dir:"assets/",pagestartnum:!1,chapterstartnum:!1,imgprebuffer:5,imgpostbuffer:5,startpage:0,back:"#FFF"},pages:[],chapters:[]},b=0;ba.y&&(a.y=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight);0>a.x&&(a.x=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);var c={x:void 0!==window.pageXOffset?a.x-window.pageXOffset:a.x-document.documentElement.scrollLeft,y:void 0!==window.pageYOffset? -a.y-window.pageYOffset:a.y-document.documentElement.scrollTop};if(c=={x:0,y:0})return c;var d=function(a,b,c){window.scrollBy(Math.floor(a.x)/b,Math.floor(a.y)/b);c+1<5*b&&window.setTimeout(d,5,a,b,c+1)};window.setTimeout(d,5,c,Math.floor(b/5),0);return c},m=function(){e[this.imaginaryID].loaded=!0},q=function(a,b){y=!0;window.setTimeout(F,k.rate,w);D();e[b].loaded||B.clearRect(0,0,c[1].width,c[1].height);a.imaginaryID=b;a.src=p.dir+e[b].url[0];for(var d=0,f=b-1;f>b-p.imgprebuffer-1&&0<=f;f--)e[f].loaded|| -(u[d].imaginaryID=f,u[d].src=p.dir+e[f].url,d++);d=0;for(f=b+1;fa.y&&(a.y=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight);0>a.x&&(a.x=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);var c={x:void 0!==window.pageXOffset?a.x-window.pageXOffset:a.x-document.documentElement.scrollLeft,y:void 0!== +window.pageYOffset?a.y-window.pageYOffset:a.y-document.documentElement.scrollTop};if(c=={x:0,y:0})return c;var d=function(a,b,c){window.scrollBy(Math.floor(a.x)/b,Math.floor(a.y)/b);c+1<5*b&&window.setTimeout(d,5,a,b,c+1)};window.setTimeout(d,5,c,Math.floor(b/5),0);return c},l=function(){e[this.imaginaryID].loaded=!0},q=function(a,b){x=!0;window.setTimeout(E,n.rate,D);A();e[b].loaded||z.clearRect(0,0,c[1].width,c[1].height);a.imaginaryID=b;a.src=p.dir+e[b].url[0];for(var d=0,f=b-1;f>b-p.imgprebuffer- +1&&0<=f;f--)e[f].loaded||(u[d].imaginaryID=f,u[d].src=p.dir+e[f].url,d++);d=0;for(f=b+1;f 0) mapper[source.nodeType.toLowerCase()].count--;/*if count is above 0, decrement it (this limits the amount of sets)*/ } - } - for(var x=0;x=d.status?d.responseText:null} cG.REPO=cG.REPO||{};cG.REPO.agent={def:function(a,c){return c=new XMLHttpRequest,c.open("GET",a),a=[],c.onreadystatechange=c.then=function(d,e,f){if(d&&d.call&&(a=[,d,e]),4==c.readyState&&(f=a[0|c.status/200]))try{f(JSON.parse(c.responseText),c)}catch(g){f(c.responseText,c)}},c.send(),c}};cG.REPO.director={def:Path};cG.REPO.producer={def:N}; -cG.REPO.stage={def:{id:"def",construct:function(a,c,d,e){this.main=new function(a,c){if(void 0===a)return-1;if("string"===typeof a)a={parent:null,offset:0,loading:{lines:16,rate:1E3/30,width:250,height:250,xpos:.5,ypos:.5,back:"#FFF",color:"#373737"},config:{dir:"assets/",pagestartnum:!1,chapterstartnum:!1,imgprebuffer:5,imgpostbuffer:5,startpage:0,back:"#FFF"},pages:[{alt:"",hover:"",title:"",url:[a],release:0,note:"",perm:!1,anim8:!1}],chapters:[]};else if(Array.isArray(a)){for(var d={parent:null, -offset:0,loading:{lines:16,rate:1E3/30,width:250,height:250,xpos:.5,ypos:.5,back:"#FFF",color:"#373737"},config:{dir:"assets/",pagestartnum:!1,chapterstartnum:!1,imgprebuffer:5,imgpostbuffer:5,startpage:0,back:"#FFF"},pages:[],chapters:[]},e=0;ea.y&&(a.y=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight);0>a.x&&(a.x=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);var d={x:void 0!==window.pageXOffset?a.x-window.pageXOffset:a.x-document.documentElement.scrollLeft, -y:void 0!==window.pageYOffset?a.y-window.pageYOffset:a.y-document.documentElement.scrollTop};if(d=={x:0,y:0})return d;var e=function(a,c,d){window.scrollBy(Math.floor(a.x)/c,Math.floor(a.y)/c);d+1<5*c&&window.setTimeout(e,5,a,c,d+1)};window.setTimeout(e,5,d,Math.floor(c/5),0);return d},d=function(){n[this.imaginaryID].loaded=!0},x=function(a,c){q=!0;window.setTimeout(I,r.rate,B);G();n[c].loaded||F.clearRect(0,0,l[1].width,l[1].height);a.imaginaryID=c;a.src=w.dir+n[c].url[0];for(var d=0,e=c-1;e>c- -w.imgprebuffer-1&&0<=e;e--)n[e].loaded||(u[d].imaginaryID=e,u[d].src=w.dir+n[e].url,d++);d=0;for(e=c+1;ea.y&&(a.y=window.innerHeight||document.documentElement.clientHeight||document.body.clientHeight);0>a.x&&(a.x=window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);var d={x:void 0!==window.pageXOffset?a.x-window.pageXOffset: +a.x-document.documentElement.scrollLeft,y:void 0!==window.pageYOffset?a.y-window.pageYOffset:a.y-document.documentElement.scrollTop};if(d=={x:0,y:0})return d;var e=function(a,c,d){window.scrollBy(Math.floor(a.x)/c,Math.floor(a.y)/c);d+1<5*c&&window.setTimeout(e,5,a,c,d+1)};window.setTimeout(e,5,d,Math.floor(c/5),0);return d},d=function(){l[this.imaginaryID].loaded=!0},x=function(a,c){r=!0;window.setTimeout(H,u.rate,G);E();l[c].loaded||D.clearRect(0,0,n[1].width,n[1].height);a.imaginaryID=c;a.src= +w.dir+l[c].url[0];for(var d=0,e=c-1;e>c-w.imgprebuffer-1&&0<=e;e--)l[e].loaded||(v[d].imaginaryID=e,v[d].src=w.dir+l[e].url,d++);d=0;for(e=c+1;e
Archive
About Me
',f=[],g=function(a,h){var k;if(null===h||void 0===h)if(k=c[a].getAttribute("script"),""==k||"script.json"==k||void 0===k||null===k)k=cG.script;else return f.push(cG.agent(k).then(function(c,d){g(a,c)},function(c,d){console.error(c,d.status); +g(a,"")})),0;else k=""==h?cG.script:h;var l=c[a].getAttribute("id"),p=c[a].getAttribute("use"),r=c[a].getAttribute("config");if(""==l||void 0===l||null===l){for(var l="STG"+a,q=1;document.getElementById(l);)l="STG"+(a+q++);l=l.toString();c[a].setAttribute("id",l)}if(""==p||void 0===p||null===p)p="def";if(""!=r)try{r=JSON.parse(r)}catch(u){console.debug("The following configuration settings are malformed for plugin["+p+"]: ",r,"\nIt has been ignored"),r={}}else r={};c[a].innerHTML=e;cG.HELPERS.renameEles(!1, +c[a],l);q=document.getElementById(l+"_location");void 0===q||null===q?q=c[a]:cG.HELPERS.smartAttrib(c[a],{div:{style:"display: none;"}},1);q.style.display="block";d[p+"_"+a]=new cG.stage.construct(l,k,q,r)};for(a=0;a=d){if(void 0===f.count||0!=f.count){e=Object.keys(f);for(y=0;ycomix-ngn - +{def:0}:cG.REPO.decor.def=0;cG.decor=cG.REPO.decor.def});b.src=mainsrc;document.body.appendChild(b);for(var a=0;a - - - - - + + + + + +

Writer

* Settings

-
- - - - - - - - - - - - -

Configuration

-
- 1 - 1
- -
- On Off - Modified Name Size Type 
- Descending Ascending
- First Last

Chapters

-

Pages

-
      + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
      +

      Configuration

      +
      + + + + + +
      + + 0  + 1 + + 0  + 1
      + + + + + +
      + + On  + Off + + Modified  + Name  + Size  + Type  +
      + Descending  + Ascending
      + +
      + +
      +
      Loading Spinner
      +
      + + + + + + + + + + + + + + +
      +
      + + +
      + + +
      + + + + +
      +
      +

      Chapters

      + +
      +

      Pages

      + +
      +
        +
        +
          +

          * Design

          -

          -   -

          -
          +
          +

          +   + +

          +
          - - \ No newline at end of file + $("#s" + i).data({ + open: false, + body: { + alt: conf.pages[i].alt, + hover: conf.pages[i].hover, + title: conf.pages[i].title, + url: conf.pages[i].url, + release: conf.pages[i].release, + note: conf.pages[i].note, + perm: conf.pages[i].perm, + } + }).addClass("page"); + } + for (oper = 0; oper < conf.chapters.length; oper++) { + $("#Csort").append("
        1. " + conf.chapters[i].title + "
        2. ").sortable({ + scroll: true + }); + $("#c" + oper).data({ + open: false, + body: { + description: conf.chapters[i].description, + end: conf.chapters[i].end, + start: conf.chapters[i].start, + title: conf.chapters[i].title, + } + }).addClass("chap"); + } + }; + }, + dfr=function(){var t=document.createElement("script");cG.REPO.scReq.getScript=cG.agent("./"+dir+"script.json"),cG.REPO.scReq.getDecor=cG.agent("./"+tir+"decor.html"),cG.REPO.scReq.getScript.then(function(t){void 0===cG.REPO.script?cG.REPO.script={def:t}:cG.REPO.script.def=t,cG.script=cG.REPO.script.def},function(t,e){console.error(t,e.status),void 0===cG.REPO.script?cG.REPO.script={def:0}:cG.REPO.script.def=t,cG.script=cG.REPO.script.def}),cG.REPO.scReq.getDecor.then(function(t){void 0===cG.REPO.decor?cG.REPO.decor={def:t}:cG.REPO.decor.def=t,cG.decor=cG.REPO.decor.def},function(t,e){console.error(t,e.status),void 0===cG.REPO.decor?cG.REPO.decor={def:0}:cG.REPO.decor.def=0,cG.decor=cG.REPO.decor.def}),t.src=mainsrc,document.body.appendChild(t);for(var e=0;e0&&(this.currentTimer=setTimeout(i.bind(this._afterTimeout,this),s)),i.isArray(t.html)&&(t.html="
          • "+t.html.join("
          • ")+"
          "),this.el.innerHTML=t.html,this.currentMsg=t,this.el.className=this.baseCls,i.transSupport?(this.el.style.display="block",setTimeout(i.bind(this._showMsg,this),50)):this._showMsg()}},_setOpacity:function(t){if(i.useFilter)try{this.el.filters.item("DXImageTransform.Microsoft.Alpha").Opacity=100*t}catch(e){}else this.el.style.opacity=t+""},_showMsg:function(){var t=i.config(this.currentMsg.addnCls,this.addnCls);if(i.transSupport)this.el.className=this.baseCls+" "+t+" "+this.baseCls+"-animate";else{var e=0;this.el.className=this.baseCls+" "+t+" "+this.baseCls+"-js-animate",this._setOpacity(0),this.el.style.display="block";var s=this,n=setInterval(function(){1>e?(e+=.1,e>1&&(e=1),s._setOpacity(e)):clearInterval(n)},30)}},_hideMsg:function(){var t=i.config(this.currentMsg.addnCls,this.addnCls);if(i.transSupport)this.el.className=this.baseCls+" "+t,i.on(this.el,i.vendorPrefix?i.vendorPrefix+"TransitionEnd":"transitionend",this.transEvent);else var e=1,s=this,n=setInterval(function(){e>0?(e-=.1,0>e&&(e=0),s._setOpacity(e)):(s.el.className=s.baseCls+" "+t,clearInterval(n),s._afterAnimation())},30)},_afterAnimation:function(){i.transSupport&&i.off(this.el,i.vendorPrefix?i.vendorPrefix+"TransitionEnd":"transitionend",this.transEvent),this.currentMsg.cb&&this.currentMsg.cb(),this.el.style.display="none",this._animating=!1,this._run()},remove:function(t){var s="function"==typeof t?t:null;i.off(e.body,"mousemove",this.removeEvent),i.off(e.body,"click",this.removeEvent),i.off(e.body,"keypress",this.removeEvent),i.off(e.body,"touchstart",this.removeEvent),i.off(this.el,"click",this.removeEvent),i.off(this.el,"touchstart",this.removeEvent),this.removeEventsSet=!1,s&&this.currentMsg&&(this.currentMsg.cb=s),this._animating?this._hideMsg():s&&s()},log:function(t,e,i,s){var n={};if(s)for(var r in s)n[r]=s[r];if("function"==typeof e)i=e;else if(e)for(var r in e)n[r]=e[r];return n.html=t,i&&(n.cb=i),this.queue.push(n),this._run(),this},spawn:function(t){var e=this;return function(i,s,n){return e.log.call(e,i,s,n,t),e}},create:function(t){return new s(t)}},new s})},jqdep=function(){if(void 0===window.jQuery)return setTimeout(jqdep,300);var t;/*! jquery-spoiler v1.3.0: (MIT) (c)2014 Triangle717 (http://le717.github.io) and Jarred Ballard (http://jarred.io/)*/!function(t){"use strict";"function"==typeof define&&define.amd?define(["jquery"],t):"object"==typeof exports?module.exports=t:t(jQuery)}(function(t){"use strict";t.fn.spoiler=function(e){var i=t.extend({contentClass:"spoiler-content",paddingValue:6,triggerEvents:!1,includePadding:!0,buttonActiveClass:"spoiler-active",spoilerVisibleClass:"spoiler-content-visible"},e),s="."+i.contentClass,n={};return t(s).each(function(){var e=t(this);e.css("overflow","hidden");var s=e.prop("scrollHeight");s=i.includePadding?s+parseInt(i.paddingValue,10):s;var r=e.attr("data-spoiler-link");n[r]=s+"px",e.css("height","0")}),t(this).on("click",function(){var e=t(this),r=e.attr("data-spoiler-link"),o=t(s+"[data-spoiler-link="+r+"]"),c={height:n[r]},a={height:"0"},l=o.hasClass(i.spoilerVisibleClass);o.css(l?a:c),i.triggerEvents&&e.trigger(l?"jq-spoiler-hidden":"jq-spoiler-visible"),o.toggleClass(i.spoilerVisibleClass),e.toggleClass(i.buttonActiveClass)}),this}});for(var e=0;e \ No newline at end of file diff --git a/tools/writer.min.html b/tools/writer.min.html new file mode 100644 index 0000000..b142180 --- /dev/null +++ b/tools/writer.min.html @@ -0,0 +1 @@ +Writer

          Writer

          * Settings

          Configuration

          1 1
          On  Off Modified  Name  Size  Type 
          Descending  Ascending
          Loading Spinner

          Chapters

          Pages

              * Design

               

              \ No newline at end of file