added few .html files
This commit is contained in:
1 parent
a25104fadc
commit
f64e1260a7
22 files changed
+13787
-2619
No files matched your search
Vendored
+204
@@ -0,0 +1,204 @@
|
||||
body.lb-disable-scrolling {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.lightboxOverlay {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 9999;
|
||||
background-color: black;
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=80);
|
||||
opacity: 0.8;
|
||||
display: none;
|
||||
}
|
||||
|
||||
.lightbox {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
z-index: 10000;
|
||||
text-align: center;
|
||||
line-height: 0;
|
||||
font-weight: normal;
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.lightbox .lb-image {
|
||||
display: block;
|
||||
height: auto;
|
||||
max-width: inherit;
|
||||
max-height: none;
|
||||
border-radius: 3px;
|
||||
|
||||
/* Image border */
|
||||
border: 4px solid white;
|
||||
}
|
||||
|
||||
.lightbox a img {
|
||||
border: none;
|
||||
}
|
||||
|
||||
.lb-outerContainer {
|
||||
position: relative;
|
||||
*zoom: 1;
|
||||
width: 250px;
|
||||
height: 250px;
|
||||
margin: 0 auto;
|
||||
border-radius: 4px;
|
||||
|
||||
/* Background color behind image.
|
||||
This is visible during transitions. */
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.lb-outerContainer:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.lb-loader {
|
||||
position: absolute;
|
||||
top: 43%;
|
||||
left: 0;
|
||||
height: 25%;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
line-height: 0;
|
||||
}
|
||||
|
||||
.lb-cancel {
|
||||
display: block;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
margin: 0 auto;
|
||||
background: url(../images/loading.gif) no-repeat;
|
||||
}
|
||||
|
||||
.lb-nav {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
}
|
||||
|
||||
.lb-container > .nav {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
.lb-nav a {
|
||||
outline: none;
|
||||
background-image: url('data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==');
|
||||
}
|
||||
|
||||
.lb-prev, .lb-next {
|
||||
height: 100%;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.lb-nav a.lb-prev {
|
||||
width: 34%;
|
||||
left: 0;
|
||||
float: left;
|
||||
background: url(../images/prev.png) left 48% no-repeat;
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.6s;
|
||||
-moz-transition: opacity 0.6s;
|
||||
-o-transition: opacity 0.6s;
|
||||
transition: opacity 0.6s;
|
||||
}
|
||||
|
||||
.lb-nav a.lb-prev:hover {
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.lb-nav a.lb-next {
|
||||
width: 64%;
|
||||
right: 0;
|
||||
float: right;
|
||||
background: url(../images/next.png) right 48% no-repeat;
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=0);
|
||||
opacity: 0;
|
||||
-webkit-transition: opacity 0.6s;
|
||||
-moz-transition: opacity 0.6s;
|
||||
-o-transition: opacity 0.6s;
|
||||
transition: opacity 0.6s;
|
||||
}
|
||||
|
||||
.lb-nav a.lb-next:hover {
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.lb-dataContainer {
|
||||
margin: 0 auto;
|
||||
padding-top: 5px;
|
||||
*zoom: 1;
|
||||
width: 100%;
|
||||
border-bottom-left-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
}
|
||||
|
||||
.lb-dataContainer:after {
|
||||
content: "";
|
||||
display: table;
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.lb-data {
|
||||
padding: 0 4px;
|
||||
color: #ccc;
|
||||
}
|
||||
|
||||
.lb-data .lb-details {
|
||||
width: 85%;
|
||||
float: left;
|
||||
text-align: left;
|
||||
line-height: 1.1em;
|
||||
}
|
||||
|
||||
.lb-data .lb-caption {
|
||||
font-size: 13px;
|
||||
font-weight: bold;
|
||||
line-height: 1em;
|
||||
}
|
||||
|
||||
.lb-data .lb-caption a {
|
||||
color: #4ae;
|
||||
}
|
||||
|
||||
.lb-data .lb-number {
|
||||
display: block;
|
||||
clear: left;
|
||||
padding-bottom: 1em;
|
||||
font-size: 12px;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.lb-data .lb-close {
|
||||
display: block;
|
||||
float: right;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background: url(../images/close.png) top right no-repeat;
|
||||
text-align: right;
|
||||
outline: none;
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=70);
|
||||
opacity: 0.7;
|
||||
-webkit-transition: opacity 0.2s;
|
||||
-moz-transition: opacity 0.2s;
|
||||
-o-transition: opacity 0.2s;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
|
||||
.lb-data .lb-close:hover {
|
||||
cursor: pointer;
|
||||
filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=100);
|
||||
opacity: 1;
|
||||
}
|
||||
+1
@@ -0,0 +1 @@
|
||||
.lb-loader,.lightbox{text-align:center;line-height:0;position:absolute;left:0}body.lb-disable-scrolling{overflow:hidden}.lightboxOverlay{position:absolute;top:0;left:0;z-index:9999;background-color:#000;filter:alpha(Opacity=80);opacity:.8;display:none}.lightbox{width:100%;z-index:10000;font-weight:400;outline:0}.lightbox .lb-image{display:block;height:auto;max-width:inherit;max-height:none;border-radius:3px;border:4px solid #fff}.lightbox a img{border:none}.lb-outerContainer{position:relative;width:250px;height:250px;margin:0 auto;border-radius:4px;background-color:#fff}.lb-outerContainer:after{content:"";display:table;clear:both}.lb-loader{top:43%;height:25%;width:100%}.lb-cancel{display:block;width:32px;height:32px;margin:0 auto;background:url(../images/loading.gif) no-repeat}.lb-nav{position:absolute;top:0;left:0;height:100%;width:100%;z-index:10}.lb-container>.nav{left:0}.lb-nav a{outline:0;background-image:url(data:image/gif;base64,R0lGODlhAQABAPAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==)}.lb-next,.lb-prev{height:100%;cursor:pointer;display:block}.lb-nav a.lb-prev{width:34%;left:0;float:left;background:url(../images/prev.png) left 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-prev:hover{filter:alpha(Opacity=100);opacity:1}.lb-nav a.lb-next{width:64%;right:0;float:right;background:url(../images/next.png) right 48% no-repeat;filter:alpha(Opacity=0);opacity:0;-webkit-transition:opacity .6s;-moz-transition:opacity .6s;-o-transition:opacity .6s;transition:opacity .6s}.lb-nav a.lb-next:hover{filter:alpha(Opacity=100);opacity:1}.lb-dataContainer{margin:0 auto;padding-top:5px;width:100%;border-bottom-left-radius:4px;border-bottom-right-radius:4px}.lb-dataContainer:after{content:"";display:table;clear:both}.lb-data{padding:0 4px;color:#ccc}.lb-data .lb-details{width:85%;float:left;text-align:left;line-height:1.1em}.lb-data .lb-caption{font-size:13px;font-weight:700;line-height:1em}.lb-data .lb-caption a{color:#4ae}.lb-data .lb-number{display:block;clear:left;padding-bottom:1em;font-size:12px;color:#999}.lb-data .lb-close{display:block;float:right;width:30px;height:30px;background:url(../images/close.png) top right no-repeat;text-align:right;outline:0;filter:alpha(Opacity=70);opacity:.7;-webkit-transition:opacity .2s;-moz-transition:opacity .2s;-o-transition:opacity .2s;transition:opacity .2s}.lb-data .lb-close:hover{cursor:pointer;filter:alpha(Opacity=100);opacity:1}
|
||||
Vendored
BIN
Binary file not shown.
|
After Width: | Height: | Size: 280 B |
Vendored
BIN
Binary file not shown.
|
After Width: | Height: | Size: 8.3 KiB |
Vendored
BIN
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
Vendored
BIN
Binary file not shown.
|
After Width: | Height: | Size: 1.3 KiB |
+11158
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,38 @@
|
||||
/*!
|
||||
* jQuery JavaScript Library v3.4.1
|
||||
* https://jquery.com/
|
||||
*
|
||||
* Includes Sizzle.js
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright JS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://jquery.org/license
|
||||
*
|
||||
* Date: 2019-05-01T21:04Z
|
||||
*/
|
||||
!function(a,b){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=a.document?b(a,!0):function(a){if(!a.document)throw new Error("jQuery requires a window with a document");return b(a)}:b(a)}("undefined"!=typeof window?window:this,function(a,b){"use strict";function c(a,b,c){c=c||ia;var d,e,f=c.createElement("script");if(f.text=a,b)for(d in wa)(e=b[d]||b.getAttribute&&b.getAttribute(d))&&f.setAttribute(d,e);c.head.appendChild(f).parentNode.removeChild(f)}function d(a){return null==a?a+"":"object"==typeof a||"function"==typeof a?oa[pa.call(a)]||"object":typeof a}function e(a){var b=!!a&&"length"in a&&a.length,c=d(a);return!ua(a)&&!va(a)&&("array"===c||0===b||"number"==typeof b&&b>0&&b-1 in a)}function f(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()}function g(a,b,c){return ua(b)?ya.grep(a,function(a,d){return!!b.call(a,d,a)!==c}):b.nodeType?ya.grep(a,function(a){return a===b!==c}):"string"!=typeof b?ya.grep(a,function(a){return na.call(b,a)>-1!==c}):ya.filter(b,a,c)}function h(a,b){for(;(a=a[b])&&1!==a.nodeType;);return a}function i(a){var b={};return ya.each(a.match(Ja)||[],function(a,c){b[c]=!0}),b}function j(a){return a}function k(a){throw a}function l(a,b,c,d){var e;try{a&&ua(e=a.promise)?e.call(a).done(b).fail(c):a&&ua(e=a.then)?e.call(a,b,c):b.apply(void 0,[a].slice(d))}catch(a){c.apply(void 0,[a])}}function m(){ia.removeEventListener("DOMContentLoaded",m),a.removeEventListener("load",m),ya.ready()}function n(a,b){return b.toUpperCase()}function o(a){return a.replace(Na,"ms-").replace(Oa,n)}function p(){this.expando=ya.expando+p.uid++}function q(a){return"true"===a||"false"!==a&&("null"===a?null:a===+a+""?+a:Sa.test(a)?JSON.parse(a):a)}function r(a,b,c){var d;if(void 0===c&&1===a.nodeType)if(d="data-"+b.replace(Ta,"-$&").toLowerCase(),"string"==typeof(c=a.getAttribute(d))){try{c=q(c)}catch(a){}Ra.set(a,b,c)}else c=void 0;return c}function s(a,b,c,d){var e,f,g=20,h=d?function(){return d.cur()}:function(){return ya.css(a,b,"")},i=h(),j=c&&c[3]||(ya.cssNumber[b]?"":"px"),k=a.nodeType&&(ya.cssNumber[b]||"px"!==j&&+i)&&Va.exec(ya.css(a,b));if(k&&k[3]!==j){for(i/=2,j=j||k[3],k=+i||1;g--;)ya.style(a,b,k+j),(1-f)*(1-(f=h()/i||.5))<=0&&(g=0),k/=f;k*=2,ya.style(a,b,k+j),c=c||[]}return c&&(k=+k||+i||0,e=c[1]?k+(c[1]+1)*c[2]:+c[2],d&&(d.unit=j,d.start=k,d.end=e)),e}function t(a){var b,c=a.ownerDocument,d=a.nodeName,e=ab[d];return e||(b=c.body.appendChild(c.createElement(d)),e=ya.css(b,"display"),b.parentNode.removeChild(b),"none"===e&&(e="block"),ab[d]=e,e)}function u(a,b){for(var c,d,e=[],f=0,g=a.length;f<g;f++)d=a[f],d.style&&(c=d.style.display,b?("none"===c&&(e[f]=Qa.get(d,"display")||null,e[f]||(d.style.display="")),""===d.style.display&&$a(d)&&(e[f]=t(d))):"none"!==c&&(e[f]="none",Qa.set(d,"display",c)));for(f=0;f<g;f++)null!=e[f]&&(a[f].style.display=e[f]);return a}function v(a,b){var c;return c=void 0!==a.getElementsByTagName?a.getElementsByTagName(b||"*"):void 0!==a.querySelectorAll?a.querySelectorAll(b||"*"):[],void 0===b||b&&f(a,b)?ya.merge([a],c):c}function w(a,b){for(var c=0,d=a.length;c<d;c++)Qa.set(a[c],"globalEval",!b||Qa.get(b[c],"globalEval"))}function x(a,b,c,e,f){for(var g,h,i,j,k,l,m=b.createDocumentFragment(),n=[],o=0,p=a.length;o<p;o++)if((g=a[o])||0===g)if("object"===d(g))ya.merge(n,g.nodeType?[g]:g);else if(fb.test(g)){for(h=h||m.appendChild(b.createElement("div")),i=(cb.exec(g)||["",""])[1].toLowerCase(),j=eb[i]||eb._default,h.innerHTML=j[1]+ya.htmlPrefilter(g)+j[2],l=j[0];l--;)h=h.lastChild;ya.merge(n,h.childNodes),h=m.firstChild,h.textContent=""}else n.push(b.createTextNode(g));for(m.textContent="",o=0;g=n[o++];)if(e&&ya.inArray(g,e)>-1)f&&f.push(g);else if(k=Ya(g),h=v(m.appendChild(g),"script"),k&&w(h),c)for(l=0;g=h[l++];)db.test(g.type||"")&&c.push(g);return m}function y(){return!0}function z(){return!1}function A(a,b){return a===B()==("focus"===b)}function B(){try{return ia.activeElement}catch(a){}}function C(a,b,c,d,e,f){var g,h;if("object"==typeof b){"string"!=typeof c&&(d=d||c,c=void 0);for(h in b)C(a,h,c,d,b[h],f);return a}if(null==d&&null==e?(e=c,d=c=void 0):null==e&&("string"==typeof c?(e=d,d=void 0):(e=d,d=c,c=void 0)),!1===e)e=z;else if(!e)return a;return 1===f&&(g=e,e=function(a){return ya().off(a),g.apply(this,arguments)},e.guid=g.guid||(g.guid=ya.guid++)),a.each(function(){ya.event.add(this,b,e,d,c)})}function D(a,b,c){if(!c)return void(void 0===Qa.get(a,b)&&ya.event.add(a,b,y));Qa.set(a,b,!1),ya.event.add(a,b,{namespace:!1,handler:function(a){var d,e,f=Qa.get(this,b);if(1&a.isTrigger&&this[b]){if(f.length)(ya.event.special[b]||{}).delegateType&&a.stopPropagation();else if(f=ka.call(arguments),Qa.set(this,b,f),d=c(this,b),this[b](),e=Qa.get(this,b),f!==e||d?Qa.set(this,b,!1):e={},f!==e)return a.stopImmediatePropagation(),a.preventDefault(),e.value}else f.length&&(Qa.set(this,b,{value:ya.event.trigger(ya.extend(f[0],ya.Event.prototype),f.slice(1),this)}),a.stopImmediatePropagation())}})}function E(a,b){return f(a,"table"Line truncated
|
||||
* Sizzle CSS Selector Engine v2.3.4
|
||||
* https://sizzlejs.com/
|
||||
*
|
||||
* Copyright JS Foundation and other contributors
|
||||
* Released under the MIT license
|
||||
* https://js.foundation/
|
||||
*
|
||||
* Date: 2019-04-08
|
||||
*/
|
||||
function(a){function b(a,b,c,d){var e,f,g,h,i,j,k,m=b&&b.ownerDocument,o=b?b.nodeType:9;if(c=c||[],"string"!=typeof a||!a||1!==o&&9!==o&&11!==o)return c;if(!d&&((b?b.ownerDocument||b:P)!==H&&G(b),b=b||H,J)){if(11!==o&&(i=ta.exec(a)))if(e=i[1]){if(9===o){if(!(g=b.getElementById(e)))return c;if(g.id===e)return c.push(g),c}else if(m&&(g=m.getElementById(e))&&N(b,g)&&g.id===e)return c.push(g),c}else{if(i[2])return _.apply(c,b.getElementsByTagName(a)),c;if((e=i[3])&&w.getElementsByClassName&&b.getElementsByClassName)return _.apply(c,b.getElementsByClassName(e)),c}if(w.qsa&&!V[a+" "]&&(!K||!K.test(a))&&(1!==o||"object"!==b.nodeName.toLowerCase())){if(k=a,m=b,1===o&&la.test(a)){for((h=b.getAttribute("id"))?h=h.replace(xa,ya):b.setAttribute("id",h=O),j=A(a),f=j.length;f--;)j[f]="#"+h+" "+n(j[f]);k=j.join(","),m=ua.test(a)&&l(b.parentNode)||b}try{return _.apply(c,m.querySelectorAll(k)),c}catch(b){V(a,!0)}finally{h===O&&b.removeAttribute("id")}}}return C(a.replace(ia,"$1"),b,c,d)}function c(){function a(c,d){return b.push(c+" ")>x.cacheLength&&delete a[b.shift()],a[c+" "]=d}var b=[];return a}function d(a){return a[O]=!0,a}function e(a){var b=H.createElement("fieldset");try{return!!a(b)}catch(a){return!1}finally{b.parentNode&&b.parentNode.removeChild(b),b=null}}function f(a,b){for(var c=a.split("|"),d=c.length;d--;)x.attrHandle[c[d]]=b}function g(a,b){var c=b&&a,d=c&&1===a.nodeType&&1===b.nodeType&&a.sourceIndex-b.sourceIndex;if(d)return d;if(c)for(;c=c.nextSibling;)if(c===b)return-1;return a?1:-1}function h(a){return function(b){return"input"===b.nodeName.toLowerCase()&&b.type===a}}function i(a){return function(b){var c=b.nodeName.toLowerCase();return("input"===c||"button"===c)&&b.type===a}}function j(a){return function(b){return"form"in b?b.parentNode&&!1===b.disabled?"label"in b?"label"in b.parentNode?b.parentNode.disabled===a:b.disabled===a:b.isDisabled===a||b.isDisabled!==!a&&Aa(b)===a:b.disabled===a:"label"in b&&b.disabled===a}}function k(a){return d(function(b){return b=+b,d(function(c,d){for(var e,f=a([],c.length,b),g=f.length;g--;)c[e=f[g]]&&(c[e]=!(d[e]=c[e]))})})}function l(a){return a&&void 0!==a.getElementsByTagName&&a}function m(){}function n(a){for(var b=0,c=a.length,d="";b<c;b++)d+=a[b].value;return d}function o(a,b,c){var d=b.dir,e=b.next,f=e||d,g=c&&"parentNode"===f,h=R++;return b.first?function(b,c,e){for(;b=b[d];)if(1===b.nodeType||g)return a(b,c,e);return!1}:function(b,c,i){var j,k,l,m=[Q,h];if(i){for(;b=b[d];)if((1===b.nodeType||g)&&a(b,c,i))return!0}else for(;b=b[d];)if(1===b.nodeType||g)if(l=b[O]||(b[O]={}),k=l[b.uniqueID]||(l[b.uniqueID]={}),e&&e===b.nodeName.toLowerCase())b=b[d]||b;else{if((j=k[f])&&j[0]===Q&&j[1]===h)return m[2]=j[2];if(k[f]=m,m[2]=a(b,c,i))return!0}return!1}}function p(a){return a.length>1?function(b,c,d){for(var e=a.length;e--;)if(!a[e](b,c,d))return!1;return!0}:a[0]}function q(a,c,d){for(var e=0,f=c.length;e<f;e++)b(a,c[e],d);return d}function r(a,b,c,d,e){for(var f,g=[],h=0,i=a.length,j=null!=b;h<i;h++)(f=a[h])&&(c&&!c(f,d,e)||(g.push(f),j&&b.push(h)));return g}function s(a,b,c,e,f,g){return e&&!e[O]&&(e=s(e)),f&&!f[O]&&(f=s(f,g)),d(function(d,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=d||q(b||"*",h.nodeType?[h]:h,[]),s=!a||!d&&b?p:r(p,m,a,h,i),t=c?f||(d?a:o||e)?[]:g:s;if(c&&c(s,t,h,i),e)for(j=r(t,n),e(j,[],h,i),k=j.length;k--;)(l=j[k])&&(t[n[k]]=!(s[n[k]]=l));if(d){if(f||a){if(f){for(j=[],k=t.length;k--;)(l=t[k])&&j.push(s[k]=l);f(null,t=[],j,i)}for(k=t.length;k--;)(l=t[k])&&(j=f?ba(d,l):m[k])>-1&&(d[j]=!(g[j]=l))}}else t=r(t===g?t.splice(o,t.length):t),f?f(null,g,t,i):_.apply(g,t)})}function t(a){for(var b,c,d,e=a.length,f=x.relative[a[0].type],g=f||x.relative[" "],h=f?1:0,i=o(function(a){return a===b},g,!0),j=o(function(a){return ba(b,a)>-1},g,!0),k=[function(a,c,d){var e=!f&&(d||c!==D)||((b=c).nodeType?i(a,c,d):j(a,c,d));return b=null,e}];h<e;h++)if(c=x.relative[a[h].type])k=[o(p(k),c)];else{if(c=x.filter[a[h].type].apply(null,a[h].matches),c[O]){for(d=++h;d<e&&!x.relative[a[d].type];d++);return s(h>1&&p(k),h>1&&n(a.slice(0,h-1).concat({value:" "===a[h-2].type?"*":""})).replace(ia,"$1"),c,h<d&&t(a.slice(h,d)),d<e&&t(a=a.slice(d)),d<e&&n(a))}k.push(c)}return p(k)}function u(a,c){var e=c.length>0,f=a.length>0,g=function(d,g,h,i,j){var k,l,m,n=0,o="0",p=d&&[],q=[],s=D,t=d||f&&x.find.TAG("*",j),u=Q+=null==s?1:Math.random()||.1,v=t.length;for(j&&(D=g===H||g||j);o!==v&&null!=(k=t[o]);o++){if(f&&k){for(l=0,g||k.ownerDocument===H||(G(k),h=!J);m=a[l++];)if(m(k,g||H,h)){i.push(k);break}j&&(Q=u)}e&&((k=!m&&k)&&n--,d&&p.push(k))}if(n+=o,e&&o!==n){for(l=0;m=c[l++];)m(p,q,g,h);if(d){if(n>0)for(;o--;)p[o]||q[o]||(q[o]=Z.call(i));q=r(q)}_.apply(i,q),j&&!d&&q.length>0&&n+c.length>1&&b.uniqueSort(i)}return j&&(Q=u,D=s),p};return e?d(g):g}var v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O="sizzle"+1*new Date,P=a.document,Q=0,R=0,S=c(),T=c(),U=c(),V=c(),W=function(a,b){return a===b&&(F=!0),0},X={}.hasOwnProperty,Y=[],Z=Y.pop,$=Y.push,_=Y.push,aa=Y.slice,ba=function(a,b){for(var c=0,d=a.length;c<Line truncated
|
||||
* Lightbox v2.11.1
|
||||
* by Lokesh Dhakar
|
||||
*
|
||||
* More info:
|
||||
* http://lokeshdhakar.com/projects/lightbox2/
|
||||
*
|
||||
* Copyright Lokesh Dhakar
|
||||
* Released under the MIT license
|
||||
* https://github.com/lokesh/lightbox2/blob/master/LICENSE
|
||||
*
|
||||
* @preserve
|
||||
*/
|
||||
function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.lightbox=b(a.jQuery)}(this,function(a){function b(b){this.album=[],this.currentImageIndex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}return b.defaults={albumLabel:"Image %1 of %2",alwaysShowNavOnTouchDevices:!1,fadeDuration:600,fitImagesInViewport:!0,imageFadeDuration:600,positionFromTop:50,resizeDuration:700,showImageNumberLabel:!0,wrapAround:!1,disableScrolling:!1,sanitizeTitle:!1},b.prototype.option=function(b){a.extend(this.options,b)},b.prototype.imageCountLabel=function(a,b){return this.options.albumLabel.replace(/%1/g,a).replace(/%2/g,b)},b.prototype.init=function(){var b=this;a(document).ready(function(){b.enable(),b.build()})},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){if(!(a("#lightbox").length>0)){var b=this;a('<div id="lightboxOverlay" tabindex="-1" class="lightboxOverlay"></div><div id="lightbox" tabindex="-1" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt=""/><div class="lb-nav"><a class="lb-prev" aria-label="Previous image" href="" ></a><a class="lb-next" aria-label="Next image" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.$image=this.$lightbox.find(".lb-image"),this.$nav=this.$lightbox.find(".lb-nav"),this.containerPadding={top:parseInt(this.$container.css("padding-top"),10),right:parseInt(this.$container.css("padding-right"),10),bottom:parseInt(this.$container.css("padding-bottom"),10),left:parseInt(this.$container.css("padding-left"),10)},this.imageBorderWidth={top:parseInt(this.$image.css("border-top-width"),10),right:parseInt(this.$image.css("border-right-width"),10),bottom:parseInt(this.$image.css("border-bottom-width"),10),left:parseInt(this.$image.css("border-left-width"),10)},this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){"lightbox"===a(c.target).attr("id")&&b.end()}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return 0===b.currentImageIndex?b.changeImage(b.album.length-1):b.changeImage(b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.currentImageIndex===b.album.length-1?b.changeImage(0):b.changeImage(b.currentImageIndex+1),!1}),this.$nav.on("mousedown",function(a){3===a.which&&(b.$nav.css("pointer-events","none"),b.$lightbox.one("contextmenu",function(){setTimeout(function(){this.$nav.css("pointer-events","auto")}.bind(b),0)}))}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})}},b.prototype.start=function(b){function c(a){d.album.push({alt:a.attr("data-alt"),link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;i<f.length;i=++i)c(a(f[i])),f[i]===b[0]&&(g=i)}else if("lightbox"===b.attr("rel"))c(b);else{f=a(b.prop("tagName")+'[rel="'+b.attr("rel")+'"]');for(var j=0;j<f.length;j=++j)c(a(f[j])),f[j]===b[0]&&(g=j)}var k=e.scrollTop()+this.options.positionFromTop,l=e.scrollLeft();this.$lightbox.css({top:k+"px",left:l+"px"}).fadeIn(this.options.fadeDuration),this.options.disableScrolling&&a("body").addClass("lb-disable-scrolling"),this.changeImage(g)},b.prototype.changeImage=function(b){var c=this,d=this.album[b].link,e=d.split(".").slice(-1)[0],f=this.$lightbox.find(".lb-image");this.disableKeyboardNav(),this.$overlay.fadeIn(this.options.fadeDuration),a(".lb-loader").fadeIn("slow"),this.$lightbox.find(".lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption").hide(),this.$outerContainer.addClass("animating");var g=new Image;g.onload=function(){var h,i,j,k,l,m;f.attr({alt:c.album[b].alt,src:d}),a(g),f.width(g.width),f.height(g.height),m=a(window).width(),l=a(window).height(),k=m-c.containerPadding.left-c.containerPadding.right-c.imageBorderWidth.left-c.imageBorderWidth.right-20,j=l-c.containerPadding.top-c.containerPadding.bottom-c.imageBorderWidLine truncated
|
||||
//# sourceMappingURL=lightbox-plus-jquery.min.map
|
||||
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["lightbox-plus-jquery.js"],"names":["global","factory","module","exports","document","w","Error","window","this","noGlobal","DOMEval","code","node","doc","i","val","script","createElement","text","preservedScriptAttributes","getAttribute","setAttribute","head","appendChild","parentNode","removeChild","toType","obj","class2type","toString","call","isArrayLike","length","type","isFunction","isWindow","nodeName","elem","name","toLowerCase","winnow","elements","qualifier","not","jQuery","grep","nodeType","indexOf","filter","sibling","cur","dir","createOptions","options","object","each","match","rnothtmlwhite","_","flag","Identity","v","Thrower","ex","adoptValue","value","resolve","reject","noValue","method","promise","done","fail","then","apply","undefined","slice","completed","removeEventListener","ready","fcamelCase","all","letter","toUpperCase","camelCase","string","replace","rmsPrefix","rdashAlpha","Data","expando","uid","getData","data","rbrace","test","JSON","parse","dataAttr","key","rmultiDash","e","dataUser","set","adjustCSS","prop","valueParts","tween","adjusted","scale","maxIterations","currentValue","css","initial","unit","cssNumber","initialInUnit","rcssNum","exec","style","start","end","getDefaultDisplay","temp","ownerDocument","display","defaultDisplayMap","body","showHide","show","values","index","dataPriv","get","isHiddenWithinTree","getAll","context","tag","ret","getElementsByTagName","querySelectorAll","merge","setGlobalEval","elems","refElements","l","buildFragment","scripts","selection","ignored","tmp","wrap","attached","j","fragment","createDocumentFragment","nodes","rhtml","rtagName","wrapMap","_default","innerHTML","htmlPrefilter","lastChild","childNodes","firstChild","textContent","push","createTextNode","inArray","isAttached","rscriptType","returnTrue","returnFalse","expectSync","safeActiveElement","activeElement","err","on","types","selector","fn","one","origFn","event","off","arguments","guid","add","leverageNative","el","namespace","handler","notAsync","result","saved","isTrigger","special","delegateType","stopPropagation","stopImmediatePropagation","preventDefault","trigger","extend","Event","prototype","manipulationTarget","content","children","disableScript","restoreScript","removeAttribute","cloneCopyEvent","src","dest","pdataOld","pdataCur","udataOld","udataCur","events","hasData","access","handle","fixInput","rcheckableType","checked","defaultValue","domManip","collection","args","callback","concat","first","hasScripts","iNoClone","valueIsFunction","support","checkClone","rchecked","self","eq","html","map","clone","contains","_evalUrl","noModule","nonce","rcleanScript","remove","keepData","cleanData","curCSS","computed","width","minWidth","maxWidth","getStyles","getPropertyValue","pixelBoxStyles","rnumnonpx","rboxStyle","addGetHookIf","conditionFn","hookFn","vendorPropName","capName","cssPrefixes","emptyStyle","finalPropName","final","cssProps","vendorProps","setPositiveNumber","subtract","matches","Math","max","boxModelAdjustment","dimension","box","isBorderBox","styles","computedVal","extra","delta","cssExpand","ceil","getWidthOrHeight","boxSizingNeeded","boxSizingReliable","valueIsBorderBox","offsetProp","parseFloat","getClientRects","Tween","easing","init","schedule","inProgress","hidden","requestAnimationFrame","setTimeout","fx","interval","tick","createFxNow","fxNow","Date","now","genFx","includeWidth","which","attrs","height","opacity","createTween","animation","Animation","tweeners","defaultPrefilter","props","opts","toggle","hooks","oldfire","propTween","restoreDisplay","isBox","anim","orig","dataShow","queue","_queueHooks","unqueued","empty","fire","always","rfxtypes","isEmptyObject","overflow","overflowX","overflowY","propFilter","specialEasing","Array","isArray","cssHooks","expand","properties","stopped","prefilters","deferred","Deferred","currentTime","remaining","startTime","duration","percent","tweens","run","notifyWith","resolveWith","originalProperties","originalOptions","stop","gotoEnd","rejectWith","bind","progress","complete","timer","stripAndCollapse","join","getClass","classesToArray","buildParams","prefix","traditional","rbracket","addToPrefiltersOrTransports","structure","dataTypeExpression","func","dataType","dataTypes","unshift","inspectPrefiltersOrTransports","jqXHR","inspect","selected","inspected","prefilterOrFactory","dataTypeOrTransport","seekingTransport","transports","ajaxExtend","target","deep","flatOptions","ajaxSettings","ajaxHandleResponses","s","responses","ct","finalDataType","firstDataType","contents","shift","mimeType","getResponseHeader","converters","ajaxConvert","response","isSuccess","conv2","current","conv","prev","responseFields","dataFilter","split","throws","state","error","arr","getProto","Object","getPrototypeOf","hasOwn","hasOwnProperty","fnToString","ObjectFunctionString","version","rtrim","jquery","constructor","toArray","num","pushStack","prevObject","last","len","sort","splice","copy","copyIsArray"Line truncated
|
||||
Vendored
+559
@@ -0,0 +1,559 @@
|
||||
/*!
|
||||
* Lightbox v2.11.1
|
||||
* by Lokesh Dhakar
|
||||
*
|
||||
* More info:
|
||||
* http://lokeshdhakar.com/projects/lightbox2/
|
||||
*
|
||||
* Copyright Lokesh Dhakar
|
||||
* Released under the MIT license
|
||||
* https://github.com/lokesh/lightbox2/blob/master/LICENSE
|
||||
*
|
||||
* @preserve
|
||||
*/
|
||||
|
||||
// Uses Node, AMD or browser globals to create a module.
|
||||
(function (root, factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD. Register as an anonymous module.
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
// Node. Does not work with strict CommonJS, but
|
||||
// only CommonJS-like environments that support module.exports,
|
||||
// like Node.
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals (root is window)
|
||||
root.lightbox = factory(root.jQuery);
|
||||
}
|
||||
}(this, function ($) {
|
||||
|
||||
function Lightbox(options) {
|
||||
this.album = [];
|
||||
this.currentImageIndex = void 0;
|
||||
this.init();
|
||||
|
||||
// options
|
||||
this.options = $.extend({}, this.constructor.defaults);
|
||||
this.option(options);
|
||||
}
|
||||
|
||||
// Descriptions of all options available on the demo site:
|
||||
// http://lokeshdhakar.com/projects/lightbox2/index.html#options
|
||||
Lightbox.defaults = {
|
||||
albumLabel: 'Image %1 of %2',
|
||||
alwaysShowNavOnTouchDevices: false,
|
||||
fadeDuration: 600,
|
||||
fitImagesInViewport: true,
|
||||
imageFadeDuration: 600,
|
||||
// maxWidth: 800,
|
||||
// maxHeight: 600,
|
||||
positionFromTop: 50,
|
||||
resizeDuration: 700,
|
||||
showImageNumberLabel: true,
|
||||
wrapAround: false,
|
||||
disableScrolling: false,
|
||||
/*
|
||||
Sanitize Title
|
||||
If the caption data is trusted, for example you are hardcoding it in, then leave this to false.
|
||||
This will free you to add html tags, such as links, in the caption.
|
||||
|
||||
If the caption data is user submitted or from some other untrusted source, then set this to true
|
||||
to prevent xss and other injection attacks.
|
||||
*/
|
||||
sanitizeTitle: false
|
||||
};
|
||||
|
||||
Lightbox.prototype.option = function(options) {
|
||||
$.extend(this.options, options);
|
||||
};
|
||||
|
||||
Lightbox.prototype.imageCountLabel = function(currentImageNum, totalImages) {
|
||||
return this.options.albumLabel.replace(/%1/g, currentImageNum).replace(/%2/g, totalImages);
|
||||
};
|
||||
|
||||
Lightbox.prototype.init = function() {
|
||||
var self = this;
|
||||
// Both enable and build methods require the body tag to be in the DOM.
|
||||
$(document).ready(function() {
|
||||
self.enable();
|
||||
self.build();
|
||||
});
|
||||
};
|
||||
|
||||
// Loop through anchors and areamaps looking for either data-lightbox attributes or rel attributes
|
||||
// that contain 'lightbox'. When these are clicked, start lightbox.
|
||||
Lightbox.prototype.enable = function() {
|
||||
var self = this;
|
||||
$('body').on('click', 'a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]', function(event) {
|
||||
self.start($(event.currentTarget));
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
||||
// Build html for the lightbox and the overlay.
|
||||
// Attach event handlers to the new DOM elements. click click click
|
||||
Lightbox.prototype.build = function() {
|
||||
if ($('#lightbox').length > 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
var self = this;
|
||||
|
||||
// The two root notes generated, #lightboxOverlay and #lightbox are given
|
||||
// tabindex attrs so they are focusable. We attach our keyboard event
|
||||
// listeners to these two elements, and not the document. Clicking anywhere
|
||||
// while Lightbox is opened will keep the focus on or inside one of these
|
||||
// two elements.
|
||||
//
|
||||
// We do this so we can prevent propogation of the Esc keypress when
|
||||
// Lightbox is open. This prevents it from intefering with other components
|
||||
// on the page below.
|
||||
//
|
||||
// Github issue: https://github.com/lokesh/lightbox2/issues/663
|
||||
$('<div id="lightboxOverlay" tabindex="-1" class="lightboxOverlay"></div><div id="lightbox" tabindex="-1" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt=""/><div class="lb-nav"><a class="lb-prev" aria-label="Previous image" href="" ></a><a class="lb-next" aria-label="Next image" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo($('body'));
|
||||
|
||||
// Cache jQuery objects
|
||||
this.$lightbox = $('#lightbox');
|
||||
this.$overlay = $('#lightboxOverlay');
|
||||
this.$outerContainer = this.$lightbox.find('.lb-outerContainer');
|
||||
this.$container = this.$lightbox.find('.lb-container');
|
||||
this.$image = this.$lightbox.find('.lb-image');
|
||||
this.$nav = this.$lightbox.find('.lb-nav');
|
||||
|
||||
// Store css values for future lookup
|
||||
this.containerPadding = {
|
||||
top: parseInt(this.$container.css('padding-top'), 10),
|
||||
right: parseInt(this.$container.css('padding-right'), 10),
|
||||
bottom: parseInt(this.$container.css('padding-bottom'), 10),
|
||||
left: parseInt(this.$container.css('padding-left'), 10)
|
||||
};
|
||||
|
||||
this.imageBorderWidth = {
|
||||
top: parseInt(this.$image.css('border-top-width'), 10),
|
||||
right: parseInt(this.$image.css('border-right-width'), 10),
|
||||
bottom: parseInt(this.$image.css('border-bottom-width'), 10),
|
||||
left: parseInt(this.$image.css('border-left-width'), 10)
|
||||
};
|
||||
|
||||
// Attach event handlers to the newly minted DOM elements
|
||||
this.$overlay.hide().on('click', function() {
|
||||
self.end();
|
||||
return false;
|
||||
});
|
||||
|
||||
this.$lightbox.hide().on('click', function(event) {
|
||||
if ($(event.target).attr('id') === 'lightbox') {
|
||||
self.end();
|
||||
}
|
||||
});
|
||||
|
||||
this.$outerContainer.on('click', function(event) {
|
||||
if ($(event.target).attr('id') === 'lightbox') {
|
||||
self.end();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
this.$lightbox.find('.lb-prev').on('click', function() {
|
||||
if (self.currentImageIndex === 0) {
|
||||
self.changeImage(self.album.length - 1);
|
||||
} else {
|
||||
self.changeImage(self.currentImageIndex - 1);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
this.$lightbox.find('.lb-next').on('click', function() {
|
||||
if (self.currentImageIndex === self.album.length - 1) {
|
||||
self.changeImage(0);
|
||||
} else {
|
||||
self.changeImage(self.currentImageIndex + 1);
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
/*
|
||||
Show context menu for image on right-click
|
||||
|
||||
There is a div containing the navigation that spans the entire image and lives above of it. If
|
||||
you right-click, you are right clicking this div and not the image. This prevents users from
|
||||
saving the image or using other context menu actions with the image.
|
||||
|
||||
To fix this, when we detect the right mouse button is pressed down, but not yet clicked, we
|
||||
set pointer-events to none on the nav div. This is so that the upcoming right-click event on
|
||||
the next mouseup will bubble down to the image. Once the right-click/contextmenu event occurs
|
||||
we set the pointer events back to auto for the nav div so it can capture hover and left-click
|
||||
events as usual.
|
||||
*/
|
||||
this.$nav.on('mousedown', function(event) {
|
||||
if (event.which === 3) {
|
||||
self.$nav.css('pointer-events', 'none');
|
||||
|
||||
self.$lightbox.one('contextmenu', function() {
|
||||
setTimeout(function() {
|
||||
this.$nav.css('pointer-events', 'auto');
|
||||
}.bind(self), 0);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
this.$lightbox.find('.lb-loader, .lb-close').on('click', function() {
|
||||
self.end();
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
||||
// Show overlay and lightbox. If the image is part of a set, add siblings to album array.
|
||||
Lightbox.prototype.start = function($link) {
|
||||
var self = this;
|
||||
var $window = $(window);
|
||||
|
||||
$window.on('resize', $.proxy(this.sizeOverlay, this));
|
||||
|
||||
this.sizeOverlay();
|
||||
|
||||
this.album = [];
|
||||
var imageNumber = 0;
|
||||
|
||||
function addToAlbum($link) {
|
||||
self.album.push({
|
||||
alt: $link.attr('data-alt'),
|
||||
link: $link.attr('href'),
|
||||
title: $link.attr('data-title') || $link.attr('title')
|
||||
});
|
||||
}
|
||||
|
||||
// Support both data-lightbox attribute and rel attribute implementations
|
||||
var dataLightboxValue = $link.attr('data-lightbox');
|
||||
var $links;
|
||||
|
||||
if (dataLightboxValue) {
|
||||
$links = $($link.prop('tagName') + '[data-lightbox="' + dataLightboxValue + '"]');
|
||||
for (var i = 0; i < $links.length; i = ++i) {
|
||||
addToAlbum($($links[i]));
|
||||
if ($links[i] === $link[0]) {
|
||||
imageNumber = i;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ($link.attr('rel') === 'lightbox') {
|
||||
// If image is not part of a set
|
||||
addToAlbum($link);
|
||||
} else {
|
||||
// If image is part of a set
|
||||
$links = $($link.prop('tagName') + '[rel="' + $link.attr('rel') + '"]');
|
||||
for (var j = 0; j < $links.length; j = ++j) {
|
||||
addToAlbum($($links[j]));
|
||||
if ($links[j] === $link[0]) {
|
||||
imageNumber = j;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Position Lightbox
|
||||
var top = $window.scrollTop() + this.options.positionFromTop;
|
||||
var left = $window.scrollLeft();
|
||||
this.$lightbox.css({
|
||||
top: top + 'px',
|
||||
left: left + 'px'
|
||||
}).fadeIn(this.options.fadeDuration);
|
||||
|
||||
// Disable scrolling of the page while open
|
||||
if (this.options.disableScrolling) {
|
||||
$('body').addClass('lb-disable-scrolling');
|
||||
}
|
||||
|
||||
this.changeImage(imageNumber);
|
||||
};
|
||||
|
||||
// Hide most UI elements in preparation for the animated resizing of the lightbox.
|
||||
Lightbox.prototype.changeImage = function(imageNumber) {
|
||||
var self = this;
|
||||
var filename = this.album[imageNumber].link;
|
||||
var filetype = filename.split('.').slice(-1)[0];
|
||||
var $image = this.$lightbox.find('.lb-image');
|
||||
|
||||
// Disable keyboard nav during transitions
|
||||
this.disableKeyboardNav();
|
||||
|
||||
// Show loading state
|
||||
this.$overlay.fadeIn(this.options.fadeDuration);
|
||||
$('.lb-loader').fadeIn('slow');
|
||||
this.$lightbox.find('.lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption').hide();
|
||||
this.$outerContainer.addClass('animating');
|
||||
|
||||
// When image to show is preloaded, we send the width and height to sizeContainer()
|
||||
var preloader = new Image();
|
||||
preloader.onload = function() {
|
||||
var $preloader;
|
||||
var imageHeight;
|
||||
var imageWidth;
|
||||
var maxImageHeight;
|
||||
var maxImageWidth;
|
||||
var windowHeight;
|
||||
var windowWidth;
|
||||
|
||||
$image.attr({
|
||||
'alt': self.album[imageNumber].alt,
|
||||
'src': filename
|
||||
});
|
||||
|
||||
$preloader = $(preloader);
|
||||
|
||||
$image.width(preloader.width);
|
||||
$image.height(preloader.height);
|
||||
windowWidth = $(window).width();
|
||||
windowHeight = $(window).height();
|
||||
|
||||
// Calculate the max image dimensions for the current viewport.
|
||||
// Take into account the border around the image and an additional 10px gutter on each side.
|
||||
maxImageWidth = windowWidth - self.containerPadding.left - self.containerPadding.right - self.imageBorderWidth.left - self.imageBorderWidth.right - 20;
|
||||
maxImageHeight = windowHeight - self.containerPadding.top - self.containerPadding.bottom - self.imageBorderWidth.top - self.imageBorderWidth.bottom - self.options.positionFromTop - 70;
|
||||
|
||||
/*
|
||||
SVGs that don't have width and height attributes specified are reporting width and height
|
||||
values of 0 in Firefox 47 and IE11 on Windows. To fix, we set the width and height to the max
|
||||
dimensions for the viewport rather than 0 x 0.
|
||||
|
||||
https://github.com/lokesh/lightbox2/issues/552
|
||||
*/
|
||||
|
||||
if (filetype === 'svg') {
|
||||
if ((preloader.width === 0) || preloader.height === 0) {
|
||||
$image.width(maxImageWidth);
|
||||
$image.height(maxImageHeight);
|
||||
}
|
||||
}
|
||||
|
||||
// Fit image inside the viewport.
|
||||
if (self.options.fitImagesInViewport) {
|
||||
|
||||
// Check if image size is larger then maxWidth|maxHeight in settings
|
||||
if (self.options.maxWidth && self.options.maxWidth < maxImageWidth) {
|
||||
maxImageWidth = self.options.maxWidth;
|
||||
}
|
||||
if (self.options.maxHeight && self.options.maxHeight < maxImageHeight) {
|
||||
maxImageHeight = self.options.maxHeight;
|
||||
}
|
||||
|
||||
} else {
|
||||
maxImageWidth = self.options.maxWidth || preloader.width || maxImageWidth;
|
||||
maxImageHeight = self.options.maxHeight || preloader.height || maxImageHeight;
|
||||
}
|
||||
|
||||
// Is the current image's width or height is greater than the maxImageWidth or maxImageHeight
|
||||
// option than we need to size down while maintaining the aspect ratio.
|
||||
if ((preloader.width > maxImageWidth) || (preloader.height > maxImageHeight)) {
|
||||
if ((preloader.width / maxImageWidth) > (preloader.height / maxImageHeight)) {
|
||||
imageWidth = maxImageWidth;
|
||||
imageHeight = parseInt(preloader.height / (preloader.width / imageWidth), 10);
|
||||
$image.width(imageWidth);
|
||||
$image.height(imageHeight);
|
||||
} else {
|
||||
imageHeight = maxImageHeight;
|
||||
imageWidth = parseInt(preloader.width / (preloader.height / imageHeight), 10);
|
||||
$image.width(imageWidth);
|
||||
$image.height(imageHeight);
|
||||
}
|
||||
}
|
||||
self.sizeContainer($image.width(), $image.height());
|
||||
};
|
||||
|
||||
// Preload image before showing
|
||||
preloader.src = this.album[imageNumber].link;
|
||||
this.currentImageIndex = imageNumber;
|
||||
};
|
||||
|
||||
// Stretch overlay to fit the viewport
|
||||
Lightbox.prototype.sizeOverlay = function() {
|
||||
var self = this;
|
||||
/*
|
||||
We use a setTimeout 0 to pause JS execution and let the rendering catch-up.
|
||||
Why do this? If the `disableScrolling` option is set to true, a class is added to the body
|
||||
tag that disables scrolling and hides the scrollbar. We want to make sure the scrollbar is
|
||||
hidden before we measure the document width, as the presence of the scrollbar will affect the
|
||||
number.
|
||||
*/
|
||||
setTimeout(function() {
|
||||
self.$overlay
|
||||
.width($(document).width())
|
||||
.height($(document).height());
|
||||
|
||||
}, 0);
|
||||
};
|
||||
|
||||
// Animate the size of the lightbox to fit the image we are showing
|
||||
// This method also shows the the image.
|
||||
Lightbox.prototype.sizeContainer = function(imageWidth, imageHeight) {
|
||||
var self = this;
|
||||
|
||||
var oldWidth = this.$outerContainer.outerWidth();
|
||||
var oldHeight = this.$outerContainer.outerHeight();
|
||||
var newWidth = imageWidth + this.containerPadding.left + this.containerPadding.right + this.imageBorderWidth.left + this.imageBorderWidth.right;
|
||||
var newHeight = imageHeight + this.containerPadding.top + this.containerPadding.bottom + this.imageBorderWidth.top + this.imageBorderWidth.bottom;
|
||||
|
||||
function postResize() {
|
||||
self.$lightbox.find('.lb-dataContainer').width(newWidth);
|
||||
self.$lightbox.find('.lb-prevLink').height(newHeight);
|
||||
self.$lightbox.find('.lb-nextLink').height(newHeight);
|
||||
|
||||
// Set focus on one of the two root nodes so keyboard events are captured.
|
||||
self.$overlay.focus();
|
||||
|
||||
self.showImage();
|
||||
}
|
||||
|
||||
if (oldWidth !== newWidth || oldHeight !== newHeight) {
|
||||
this.$outerContainer.animate({
|
||||
width: newWidth,
|
||||
height: newHeight
|
||||
}, this.options.resizeDuration, 'swing', function() {
|
||||
postResize();
|
||||
});
|
||||
} else {
|
||||
postResize();
|
||||
}
|
||||
};
|
||||
|
||||
// Display the image and its details and begin preload neighboring images.
|
||||
Lightbox.prototype.showImage = function() {
|
||||
this.$lightbox.find('.lb-loader').stop(true).hide();
|
||||
this.$lightbox.find('.lb-image').fadeIn(this.options.imageFadeDuration);
|
||||
|
||||
this.updateNav();
|
||||
this.updateDetails();
|
||||
this.preloadNeighboringImages();
|
||||
this.enableKeyboardNav();
|
||||
};
|
||||
|
||||
// Display previous and next navigation if appropriate.
|
||||
Lightbox.prototype.updateNav = function() {
|
||||
// Check to see if the browser supports touch events. If so, we take the conservative approach
|
||||
// and assume that mouse hover events are not supported and always show prev/next navigation
|
||||
// arrows in image sets.
|
||||
var alwaysShowNav = false;
|
||||
try {
|
||||
document.createEvent('TouchEvent');
|
||||
alwaysShowNav = (this.options.alwaysShowNavOnTouchDevices) ? true : false;
|
||||
} catch (e) {}
|
||||
|
||||
this.$lightbox.find('.lb-nav').show();
|
||||
|
||||
if (this.album.length > 1) {
|
||||
if (this.options.wrapAround) {
|
||||
if (alwaysShowNav) {
|
||||
this.$lightbox.find('.lb-prev, .lb-next').css('opacity', '1');
|
||||
}
|
||||
this.$lightbox.find('.lb-prev, .lb-next').show();
|
||||
} else {
|
||||
if (this.currentImageIndex > 0) {
|
||||
this.$lightbox.find('.lb-prev').show();
|
||||
if (alwaysShowNav) {
|
||||
this.$lightbox.find('.lb-prev').css('opacity', '1');
|
||||
}
|
||||
}
|
||||
if (this.currentImageIndex < this.album.length - 1) {
|
||||
this.$lightbox.find('.lb-next').show();
|
||||
if (alwaysShowNav) {
|
||||
this.$lightbox.find('.lb-next').css('opacity', '1');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Display caption, image number, and closing button.
|
||||
Lightbox.prototype.updateDetails = function() {
|
||||
var self = this;
|
||||
|
||||
// Enable anchor clicks in the injected caption html.
|
||||
// Thanks Nate Wright for the fix. @https://github.com/NateWr
|
||||
if (typeof this.album[this.currentImageIndex].title !== 'undefined' &&
|
||||
this.album[this.currentImageIndex].title !== '') {
|
||||
var $caption = this.$lightbox.find('.lb-caption');
|
||||
if (this.options.sanitizeTitle) {
|
||||
$caption.text(this.album[this.currentImageIndex].title);
|
||||
} else {
|
||||
$caption.html(this.album[this.currentImageIndex].title);
|
||||
}
|
||||
$caption.fadeIn('fast');
|
||||
}
|
||||
|
||||
if (this.album.length > 1 && this.options.showImageNumberLabel) {
|
||||
var labelText = this.imageCountLabel(this.currentImageIndex + 1, this.album.length);
|
||||
this.$lightbox.find('.lb-number').text(labelText).fadeIn('fast');
|
||||
} else {
|
||||
this.$lightbox.find('.lb-number').hide();
|
||||
}
|
||||
|
||||
this.$outerContainer.removeClass('animating');
|
||||
|
||||
this.$lightbox.find('.lb-dataContainer').fadeIn(this.options.resizeDuration, function() {
|
||||
return self.sizeOverlay();
|
||||
});
|
||||
};
|
||||
|
||||
// Preload previous and next images in set.
|
||||
Lightbox.prototype.preloadNeighboringImages = function() {
|
||||
if (this.album.length > this.currentImageIndex + 1) {
|
||||
var preloadNext = new Image();
|
||||
preloadNext.src = this.album[this.currentImageIndex + 1].link;
|
||||
}
|
||||
if (this.currentImageIndex > 0) {
|
||||
var preloadPrev = new Image();
|
||||
preloadPrev.src = this.album[this.currentImageIndex - 1].link;
|
||||
}
|
||||
};
|
||||
|
||||
Lightbox.prototype.enableKeyboardNav = function() {
|
||||
this.$lightbox.on('keyup.keyboard', $.proxy(this.keyboardAction, this));
|
||||
this.$overlay.on('keyup.keyboard', $.proxy(this.keyboardAction, this));
|
||||
};
|
||||
|
||||
Lightbox.prototype.disableKeyboardNav = function() {
|
||||
this.$lightbox.off('.keyboard');
|
||||
this.$overlay.off('.keyboard');
|
||||
};
|
||||
|
||||
Lightbox.prototype.keyboardAction = function(event) {
|
||||
var KEYCODE_ESC = 27;
|
||||
var KEYCODE_LEFTARROW = 37;
|
||||
var KEYCODE_RIGHTARROW = 39;
|
||||
|
||||
var keycode = event.keyCode;
|
||||
if (keycode === KEYCODE_ESC) {
|
||||
// Prevent bubbling so as to not affect other components on the page.
|
||||
event.stopPropagation();
|
||||
this.end();
|
||||
} else if (keycode === KEYCODE_LEFTARROW) {
|
||||
if (this.currentImageIndex !== 0) {
|
||||
this.changeImage(this.currentImageIndex - 1);
|
||||
} else if (this.options.wrapAround && this.album.length > 1) {
|
||||
this.changeImage(this.album.length - 1);
|
||||
}
|
||||
} else if (keycode === KEYCODE_RIGHTARROW) {
|
||||
if (this.currentImageIndex !== this.album.length - 1) {
|
||||
this.changeImage(this.currentImageIndex + 1);
|
||||
} else if (this.options.wrapAround && this.album.length > 1) {
|
||||
this.changeImage(0);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
// Closing time. :-(
|
||||
Lightbox.prototype.end = function() {
|
||||
this.disableKeyboardNav();
|
||||
$(window).off('resize', this.sizeOverlay);
|
||||
this.$lightbox.fadeOut(this.options.fadeDuration);
|
||||
this.$overlay.fadeOut(this.options.fadeDuration);
|
||||
|
||||
if (this.options.disableScrolling) {
|
||||
$('body').removeClass('lb-disable-scrolling');
|
||||
}
|
||||
};
|
||||
|
||||
return new Lightbox();
|
||||
}));
|
||||
Vendored
+15
@@ -0,0 +1,15 @@
|
||||
/*!
|
||||
* Lightbox v2.11.1
|
||||
* by Lokesh Dhakar
|
||||
*
|
||||
* More info:
|
||||
* http://lokeshdhakar.com/projects/lightbox2/
|
||||
*
|
||||
* Copyright Lokesh Dhakar
|
||||
* Released under the MIT license
|
||||
* https://github.com/lokesh/lightbox2/blob/master/LICENSE
|
||||
*
|
||||
* @preserve
|
||||
*/
|
||||
!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],b):"object"==typeof exports?module.exports=b(require("jquery")):a.lightbox=b(a.jQuery)}(this,function(a){function b(b){this.album=[],this.currentImageIndex=void 0,this.init(),this.options=a.extend({},this.constructor.defaults),this.option(b)}return b.defaults={albumLabel:"Image %1 of %2",alwaysShowNavOnTouchDevices:!1,fadeDuration:600,fitImagesInViewport:!0,imageFadeDuration:600,positionFromTop:50,resizeDuration:700,showImageNumberLabel:!0,wrapAround:!1,disableScrolling:!1,sanitizeTitle:!1},b.prototype.option=function(b){a.extend(this.options,b)},b.prototype.imageCountLabel=function(a,b){return this.options.albumLabel.replace(/%1/g,a).replace(/%2/g,b)},b.prototype.init=function(){var b=this;a(document).ready(function(){b.enable(),b.build()})},b.prototype.enable=function(){var b=this;a("body").on("click","a[rel^=lightbox], area[rel^=lightbox], a[data-lightbox], area[data-lightbox]",function(c){return b.start(a(c.currentTarget)),!1})},b.prototype.build=function(){if(!(a("#lightbox").length>0)){var b=this;a('<div id="lightboxOverlay" tabindex="-1" class="lightboxOverlay"></div><div id="lightbox" tabindex="-1" class="lightbox"><div class="lb-outerContainer"><div class="lb-container"><img class="lb-image" src="data:image/gif;base64,R0lGODlhAQABAIAAAP///wAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" alt=""/><div class="lb-nav"><a class="lb-prev" aria-label="Previous image" href="" ></a><a class="lb-next" aria-label="Next image" href="" ></a></div><div class="lb-loader"><a class="lb-cancel"></a></div></div></div><div class="lb-dataContainer"><div class="lb-data"><div class="lb-details"><span class="lb-caption"></span><span class="lb-number"></span></div><div class="lb-closeContainer"><a class="lb-close"></a></div></div></div></div>').appendTo(a("body")),this.$lightbox=a("#lightbox"),this.$overlay=a("#lightboxOverlay"),this.$outerContainer=this.$lightbox.find(".lb-outerContainer"),this.$container=this.$lightbox.find(".lb-container"),this.$image=this.$lightbox.find(".lb-image"),this.$nav=this.$lightbox.find(".lb-nav"),this.containerPadding={top:parseInt(this.$container.css("padding-top"),10),right:parseInt(this.$container.css("padding-right"),10),bottom:parseInt(this.$container.css("padding-bottom"),10),left:parseInt(this.$container.css("padding-left"),10)},this.imageBorderWidth={top:parseInt(this.$image.css("border-top-width"),10),right:parseInt(this.$image.css("border-right-width"),10),bottom:parseInt(this.$image.css("border-bottom-width"),10),left:parseInt(this.$image.css("border-left-width"),10)},this.$overlay.hide().on("click",function(){return b.end(),!1}),this.$lightbox.hide().on("click",function(c){"lightbox"===a(c.target).attr("id")&&b.end()}),this.$outerContainer.on("click",function(c){return"lightbox"===a(c.target).attr("id")&&b.end(),!1}),this.$lightbox.find(".lb-prev").on("click",function(){return 0===b.currentImageIndex?b.changeImage(b.album.length-1):b.changeImage(b.currentImageIndex-1),!1}),this.$lightbox.find(".lb-next").on("click",function(){return b.currentImageIndex===b.album.length-1?b.changeImage(0):b.changeImage(b.currentImageIndex+1),!1}),this.$nav.on("mousedown",function(a){3===a.which&&(b.$nav.css("pointer-events","none"),b.$lightbox.one("contextmenu",function(){setTimeout(function(){this.$nav.css("pointer-events","auto")}.bind(b),0)}))}),this.$lightbox.find(".lb-loader, .lb-close").on("click",function(){return b.end(),!1})}},b.prototype.start=function(b){function c(a){d.album.push({alt:a.attr("data-alt"),link:a.attr("href"),title:a.attr("data-title")||a.attr("title")})}var d=this,e=a(window);e.on("resize",a.proxy(this.sizeOverlay,this)),this.sizeOverlay(),this.album=[];var f,g=0,h=b.attr("data-lightbox");if(h){f=a(b.prop("tagName")+'[data-lightbox="'+h+'"]');for(var i=0;i<f.length;i=++i)c(a(f[i])),f[i]===b[0]&&(g=i)}else if("lightbox"===b.attr("rel"))c(b);else{f=a(b.prop("tagName")+'[rel="'+b.attr("rel")+'"]');for(var j=0;j<f.length;j=++j)c(a(f[j])),f[j]===b[0]&&(g=j)}var k=e.scrollTop()+this.options.positionFromTop,l=e.scrollLeft();this.$lightbox.css({top:k+"px",left:l+"px"}).fadeIn(this.options.fadeDuration),this.options.disableScrolling&&a("body").addClass("lb-disable-scrolling"),this.changeImage(g)},b.prototype.changeImage=function(b){var c=this,d=this.album[b].link,e=d.split(".").slice(-1)[0],f=this.$lightbox.find(".lb-image");this.disableKeyboardNav(),this.$overlay.fadeIn(this.options.fadeDuration),a(".lb-loader").fadeIn("slow"),this.$lightbox.find(".lb-image, .lb-nav, .lb-prev, .lb-next, .lb-dataContainer, .lb-numbers, .lb-caption").hide(),this.$outerContainer.addClass("animating");var g=new Image;g.onload=function(){var h,i,j,k,l,m;f.attr({alt:c.album[b].alt,src:d}),a(g),f.width(g.width),f.height(g.height),m=a(window).width(),l=a(window).height(),k=m-c.containerPadding.left-c.containerPadding.right-c.imageBorderWidth.left-c.imageBorderWidth.right-20,j=l-c.containerPadding.top-c.containerPadding.bottom-c.imageBorderWiLine truncated
|
||||
//# sourceMappingURL=lightbox.min.map
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"version":3,"sources":["../../src/js/lightbox.js"],"names":["root","factory","define","amd","exports","module","require","lightbox","jQuery","this","$","Lightbox","options","album","currentImageIndex","init","extend","constructor","defaults","option","albumLabel","alwaysShowNavOnTouchDevices","fadeDuration","fitImagesInViewport","imageFadeDuration","positionFromTop","resizeDuration","showImageNumberLabel","wrapAround","disableScrolling","sanitizeTitle","prototype","imageCountLabel","currentImageNum","totalImages","replace","self","document","ready","enable","build","on","event","start","currentTarget","length","appendTo","$lightbox","$overlay","$outerContainer","find","$container","$image","$nav","containerPadding","top","parseInt","css","right","bottom","left","imageBorderWidth","hide","end","target","attr","changeImage","which","one","setTimeout","bind","$link","addToAlbum","push","alt","link","title","$window","window","proxy","sizeOverlay","$links","imageNumber","dataLightboxValue","prop","i","j","scrollTop","scrollLeft","fadeIn","addClass","filename","filetype","split","slice","disableKeyboardNav","preloader","Image","onload","imageHeight","imageWidth","maxImageHeight","maxImageWidth","windowHeight","windowWidth","src","width","height","maxWidth","maxHeight","sizeContainer","postResize","newWidth","newHeight","focus","showImage","oldWidth","outerWidth","oldHeight","outerHeight","animate","stop","updateNav","updateDetails","preloadNeighboringImages","enableKeyboardNav","alwaysShowNav","createEvent","e","show","$caption","text","html","labelText","removeClass","keyboardAction","off","keycode","keyCode","stopPropagation","fadeOut"],"mappings":";;;;;;;;;;;;;CAeC,SAAUA,EAAMC,GACS,kBAAXC,SAAyBA,OAAOC,IAEvCD,QAAQ,UAAWD,GACO,gBAAZG,SAIdC,OAAOD,QAAUH,EAAQK,QAAQ,WAGjCN,EAAKO,SAAWN,EAAQD,EAAKQ,SAEnCC,KAAM,SAAUC,GAEhB,QAASC,GAASC,GAChBH,KAAKI,SACLJ,KAAKK,sBAAoB,GACzBL,KAAKM,OAGLN,KAAKG,QAAUF,EAAEM,UAAWP,KAAKQ,YAAYC,UAC7CT,KAAKU,OAAOP,GAwgBd,MAngBAD,GAASO,UACPE,WAAY,iBACZC,6BAA6B,EAC7BC,aAAc,IACdC,qBAAqB,EACrBC,kBAAmB,IAGnBC,gBAAiB,GACjBC,eAAgB,IAChBC,sBAAsB,EACtBC,YAAY,EACZC,kBAAkB,EASlBC,eAAe,GAGjBnB,EAASoB,UAAUZ,OAAS,SAASP,GACnCF,EAAEM,OAAOP,KAAKG,QAASA,IAGzBD,EAASoB,UAAUC,gBAAkB,SAASC,EAAiBC,GAC7D,MAAOzB,MAAKG,QAAQQ,WAAWe,QAAQ,MAAOF,GAAiBE,QAAQ,MAAOD,IAGhFvB,EAASoB,UAAUhB,KAAO,WACxB,GAAIqB,GAAO3B,IAEXC,GAAE2B,UAAUC,MAAM,WAChBF,EAAKG,SACLH,EAAKI,WAMT7B,EAASoB,UAAUQ,OAAS,WAC1B,GAAIH,GAAO3B,IACXC,GAAE,QAAQ+B,GAAG,QAAS,+EAAgF,SAASC,GAE7G,MADAN,GAAKO,MAAMjC,EAAEgC,EAAME,iBACZ,KAMXjC,EAASoB,UAAUS,MAAQ,WACzB,KAAI9B,EAAE,aAAamC,OAAS,GAA5B,CAIA,GAAIT,GAAO3B,IAaXC,GAAE,2tBAA2tBoC,SAASpC,EAAE,SAGxuBD,KAAKsC,UAAkBrC,EAAE,aACzBD,KAAKuC,SAAkBtC,EAAE,oBACzBD,KAAKwC,gBAAkBxC,KAAKsC,UAAUG,KAAK,sBAC3CzC,KAAK0C,WAAkB1C,KAAKsC,UAAUG,KAAK,iBAC3CzC,KAAK2C,OAAkB3C,KAAKsC,UAAUG,KAAK,aAC3CzC,KAAK4C,KAAkB5C,KAAKsC,UAAUG,KAAK,WAG3CzC,KAAK6C,kBACHC,IAAKC,SAAS/C,KAAK0C,WAAWM,IAAI,eAAgB,IAClDC,MAAOF,SAAS/C,KAAK0C,WAAWM,IAAI,iBAAkB,IACtDE,OAAQH,SAAS/C,KAAK0C,WAAWM,IAAI,kBAAmB,IACxDG,KAAMJ,SAAS/C,KAAK0C,WAAWM,IAAI,gBAAiB,KAGtDhD,KAAKoD,kBACHN,IAAKC,SAAS/C,KAAK2C,OAAOK,IAAI,oBAAqB,IACnDC,MAAOF,SAAS/C,KAAK2C,OAAOK,IAAI,sBAAuB,IACvDE,OAAQH,SAAS/C,KAAK2C,OAAOK,IAAI,uBAAwB,IACzDG,KAAMJ,SAAS/C,KAAK2C,OAAOK,IAAI,qBAAsB,KAIvDhD,KAAKuC,SAASc,OAAOrB,GAAG,QAAS,WAE/B,MADAL,GAAK2B,OACE,IAGTtD,KAAKsC,UAAUe,OAAOrB,GAAG,QAAS,SAASC,GACN,aAA/BhC,EAAEgC,EAAMsB,QAAQC,KAAK,OACvB7B,EAAK2B,QAITtD,KAAKwC,gBAAgBR,GAAG,QAAS,SAASC,GAIxC,MAHmC,aAA/BhC,EAAEgC,EAAMsB,QAAQC,KAAK,OACvB7B,EAAK2B,OAEA,IAGTtD,KAAKsC,UAAUG,KAAK,YAAYT,GAAG,QAAS,WAM1C,MAL+B,KAA3BL,EAAKtB,kBACPsB,EAAK8B,YAAY9B,EAAKvB,MAAMgC,OAAS,GAErCT,EAAK8B,YAAY9B,EAAKtB,kBAAoB,IAErC,IAGTL,KAAKsC,UAAUG,KAAK,YAAYT,GAAG,QAAS,WAM1C,MALIL,GAAKtB,oBAAsBsB,EAAKvB,MAAMgC,OAAS,EACjDT,EAAK8B,YAAY,GAEjB9B,EAAK8B,YAAY9B,EAAKtB,kBAAoB,IAErC,IAgBTL,KAAK4C,KAAKZ,GAAG,YAAa,SAASC,GACb,IAAhBA,EAAMyB,QACR/B,EAAKiB,KAAKI,IAAI,iBAAkB,QAEhCrB,EAAKW,UAAUqB,IAAI,cAAe,WAChCC,WAAW,WACP5D,KAAK4C,KAAKI,IAAI,iBAAkB,SAClCa,KAAKlC,GAAO,QAMpB3B,KAAKsC,UAAUG,KAAK,yBAAyBT,GAAG,QAAS,WAEvD,MADAL,GAAK2B,OACE,MAKXpD,EAASoB,UAAUY,MAAQ,SAAS4B,GAWlC,QAASC,GAAWD,GAClBnC,EAAKvB,MAAM4D,MACTC,IAAKH,EAAMN,KAAK,YAChBU,KAAMJ,EAAMN,KAAK,QACjBW,MAAOL,EAAMN,KAAK,eAAiBM,EAAMN,KAAK,WAdlD,GAAI7B,GAAU3B,KACVoE,EAAUnE,EAAEoE,OAEhBD,GAAQpC,GAAG,SAAU/B,EAAEqE,MAAMtE,KAAKuE,YAAavE,OAE/CA,KAAKuE,cAELvE,KAAKI,QACL,IAYIoE,GAZAC,EAAc,EAWdC,EAAoBZ,EAAMN,KAAK,gBAGnC,IAAIkB,EAAmB,CACrBF,EAASvE,EAAE6D,EAAMa,KAAK,WAAa,mBAAqBD,EAAoB,KAC5E,KAAK,GAAIE,GAAI,EAAGA,EAAIJ,EAAOpC,OAAQwC,IAAMA,EACvCb,EAAW9D,EAAEuE,EAAOI,KAChBJ,EAAOI,KAAOd,EAAM,KACtBW,EAAcG,OAIlB,IAA0B,aAAtBd,EAAMN,KAAK,OAEbO,EAAWD,OACN,CAELU,EAASvE,EAAE6D,EAAMa,KAAK,WAAa,SAAWb,EAAMN,KAAK,OAAS,KAClE,KAAK,GAAIqB,GAAI,EAAGA,EAAIL,EAAOpC,OAAQyC,IAAMA,EACvCd,EAAW9D,EAAEuE,EAAOK,KAChBL,EAAOK,KAAOf,EAAM,KACtBW,EAAcI,GAOtB,GAAI/B,GAAOsB,EAAQU,YAAc9E,KAAKG,QAAQa,gBAC1CmC,EAAOiB,EAAQW,YACnB/E,MAAKsC,UAAUU,KACbF,IAAKA,EAAM,KACXK,KAAMA,EAAO,OACZ6B,OAAOhF,KAAKG,QAAQU,cAGnBb,KAAKG,QAAQiB,kBACfnB,EAAE,QAAQgF,SAAS,wBAGrBjF,KAAKyD,YAALine truncated
|
||||
@@ -1,14 +1,8 @@
|
||||
$(function() {
|
||||
"use strict";
|
||||
|
||||
|
||||
|
||||
|
||||
// notification popup
|
||||
toastr.options.closeButton = true;
|
||||
toastr.options.positionClass = 'toast-bottom-right';
|
||||
toastr.options.showDuration = 1000;
|
||||
toastr['info']('Hello, welcome to HexaBit, a unique admin Template.');
|
||||
|
||||
|
||||
toastr['info']('Hello, Selamat Datang Kembali, Aplikasi Dibuat Oleh Kicap Karan.');
|
||||
});
|
||||
+308
-16
@@ -19,6 +19,10 @@
|
||||
<link rel="stylesheet" href="template_assets/vendor/toastr/toastr.min.css">
|
||||
<!-- <link rel="stylesheet" href="template_assets/vendor/morrisjs/morris.css" /> -->
|
||||
|
||||
<link rel="stylesheet" href="assets/dist/css/lightbox.min.css">
|
||||
|
||||
<link rel="stylesheet" href="template_assets/vendor/sweetalert/sweetalert.css">
|
||||
|
||||
<!-- MAIN CSS -->
|
||||
<link rel="stylesheet" href="assets/css/main.css">
|
||||
<link rel="stylesheet" href="assets/css/color_skins.css">
|
||||
@@ -59,7 +63,7 @@
|
||||
<li>
|
||||
<a class="#">
|
||||
<i class="icon-envelope"></i>
|
||||
<span>Halaman Utama</span>
|
||||
<span>Halaman Penjualan</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
@@ -68,10 +72,10 @@
|
||||
<span>Laporan </span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -83,7 +87,7 @@
|
||||
|
||||
<div id="navbar-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
|
||||
<li><a href="page-login.html" class="icon-menu"><i class="icon-power"></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -91,7 +95,7 @@
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
|
||||
<div id="left-sidebar" class="sidebar">
|
||||
<div class="navbar-brand">
|
||||
<a href="index.html"><img src="template_assets/images/icon-light.svg" alt="HexaBit Logo"
|
||||
@@ -119,13 +123,15 @@
|
||||
</div>
|
||||
<nav id="left-sidebar-nav" class="sidebar-nav">
|
||||
<ul id="main-menu" class="metismenu">
|
||||
<li class="active"><a href="index.html"><i class="icon-home"></i><span>Dashboard</span></a></li>
|
||||
<li><a href="app-inbox.html"><i class="icon-envelope"></i><span>Inbox</span></a></li>
|
||||
<li><a href="app-chat.html"><i class="icon-bubbles"></i><span>Chat</span></a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
<li class="active"><a href="index.html"><i class="icon-basket-loaded"></i><span>Halaman
|
||||
Penjualan</span></a></li>
|
||||
<li><a href="penambahan_produk.html"><i class="fa fa-edit"></i><span>Produk Baru</span></a></li>
|
||||
<li><a href="list_produk.html"><i class=" icon-list"></i><span>List Produk</span></a></li>
|
||||
<li><a href="laporan.html"><i class="icon-book-open"></i><span>Log Laporan</span></a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
@@ -135,12 +141,12 @@
|
||||
<div class="block-header">
|
||||
<div class="row clearfix">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<h2>Dashboard</h2>
|
||||
<h2>Halaman Penjualan</h2>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12 text-right">
|
||||
<ul class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="index.html"><i class="icon-home"></i></a></li>
|
||||
<li class="breadcrumb-item active">Dashboard</li>
|
||||
<li class="breadcrumb-item active">Halaman Penjualan</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -149,13 +155,253 @@
|
||||
<div class="container-fluid">
|
||||
<!-- SINI MAIN NYA -->
|
||||
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-3 col-md-12"></div>
|
||||
|
||||
<div class="col-lg-6 col-md-12">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<label>Form Pencarian Barang</label>
|
||||
<input type="text" class="form-control" placeholder="Masukkan Nama atau Kode Barang"
|
||||
id="input_pencarian_barang">
|
||||
<br>
|
||||
<div class="text-center"><button class="btn btn-primary text-center"
|
||||
onclick="cari()">Cari</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-md-12"></div>
|
||||
</div>
|
||||
|
||||
<div class="row clearfix div_pencarian" style="display: none;">
|
||||
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="card">
|
||||
<div class="header">
|
||||
<h2>Hasil Pencarian</h2>
|
||||
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover js-basic-example dataTable table-custom mb-0">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Kode Barang</th>
|
||||
<th>Nama</th>
|
||||
<th>Stok</th>
|
||||
<th>Aksi</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>A4537</td>
|
||||
<td>Adidas Merah</td>
|
||||
<td>12</td>
|
||||
<td>
|
||||
<button class="btn btn-sm round btn-outline-primary"
|
||||
data-toggle="modal" data-target="#exampleModal"><span
|
||||
class="sr-only"></span><i
|
||||
class="fa fa-shopping-cart"></i></button>
|
||||
|
||||
<a class="example-image-link" href="template_assets/images/baju/contoh_baju.jpg" data-lightbox="example-1">
|
||||
<button class="btn btn-sm round btn-outline-success">
|
||||
<span class="sr-only"></span>
|
||||
<i class="fa fa-file-image-o"></i>
|
||||
</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>A4564</td>
|
||||
<td>Adidas Putih</td>
|
||||
<td>10</td>
|
||||
<td>
|
||||
<button class="btn btn-sm round btn-outline-primary"
|
||||
data-toggle="modal" data-target="#exampleModal"><span
|
||||
class="sr-only"></span><i
|
||||
class="fa fa-shopping-cart"></i></button>
|
||||
|
||||
<a class="example-image-link" href="template_assets/images/baju/contoh_baju.jpg" data-lightbox="example-1">
|
||||
<button class="btn btn-sm round btn-outline-success">
|
||||
<span class="sr-only"></span>
|
||||
<i class="fa fa-file-image-o"></i>
|
||||
</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>A4536</td>
|
||||
<td>Adidas Hijau</td>
|
||||
<td>8</td>
|
||||
<td>
|
||||
<button class="btn btn-sm round btn-outline-primary"
|
||||
data-toggle="modal" data-target="#exampleModal"><span
|
||||
class="sr-only"></span><i
|
||||
class="fa fa-shopping-cart"></i></button>
|
||||
|
||||
<a class="example-image-link" href="template_assets/images/baju/contoh_baju.jpg" data-lightbox="example-1">
|
||||
<button class="btn btn-sm round btn-outline-success">
|
||||
<span class="sr-only"></span>
|
||||
<i class="fa fa-file-image-o"></i>
|
||||
</button>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row clearfix div_cart_list" style="display: none;">
|
||||
|
||||
<div class="col-lg-12 col-md-12 col-sm-12">
|
||||
<div class="card">
|
||||
<div class="header">
|
||||
<h2>Cart List</h2>
|
||||
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover js-basic-example dataTable table-custom mb-0">
|
||||
<thead class="thead-dark">
|
||||
<tr>
|
||||
<th>Kode Barang</th>
|
||||
<th>Nama</th>
|
||||
<th>Total Pembelian</th>
|
||||
<th>Harga</th>
|
||||
<th>Aksi</th>
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>A4537</td>
|
||||
<td>Adidas Merah</td>
|
||||
<td><input type="text" class="form-control" value="12"
|
||||
style="width: 100px;"></td>
|
||||
<td>Rp. 50,000</td>
|
||||
<td>
|
||||
<button class="btn btn-sm round btn-outline-danger"><span
|
||||
class="sr-only"></span><i class="fa fa-trash"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>A4564</td>
|
||||
<td>Adidas Putih</td>
|
||||
<td><input type="text" class="form-control" value="12"
|
||||
style="width: 100px;"></td>
|
||||
<td>Rp. 50,000</td>
|
||||
<td>
|
||||
<button class="btn btn-sm round btn-outline-danger"><span
|
||||
class="sr-only"></span><i class="fa fa-trash"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>A4536</td>
|
||||
<td>Adidas Hijau</td>
|
||||
<td><input type="text" class="form-control" value="12"
|
||||
style="width: 100px;"></td>
|
||||
<td>Rp. 50,000</td>
|
||||
<td>
|
||||
<button class="btn btn-sm round btn-outline-danger"><span
|
||||
class="sr-only"></span><i class="fa fa-trash"></i></button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-3 col-md-1"></div>
|
||||
|
||||
<div class="col-lg-6 col-md-10">
|
||||
<div class="form-group">
|
||||
<label>Total Pembayaran</label>
|
||||
<input type="text" class="form-control" value="Rp. 150,000" disabled>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Jumlah Uang Pembayaran</label>
|
||||
<input type="text" class="form-control"
|
||||
placeholder="Masukkan Jumlah Uang Pembayaran">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Baki </label>
|
||||
<input type="text" class="form-control" value="Rp. 20,000" disabled>
|
||||
</div>
|
||||
|
||||
<div class="form-group text-center">
|
||||
<button class="btn btn-sm btn-primary">Masukkan Data</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-md-1"></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">Hasil Pencarian</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group text-center">
|
||||
<img src="template_assets/images/baju/contoh_baju.jpg" alt="" width="150px" height="200px">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="">Kode</label>
|
||||
<input type="text" class="form-control" value="A4567" disabled>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="">Nama</label>
|
||||
<input type="text" class="form-control" value="Adidas Merah" disabled>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="">Harga</label>
|
||||
<input type="text" class="form-control" value="Rp 50,000" disabled>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="">Jumlah Belian</label>
|
||||
<input type="text" class="form-control" placeholder="Masukkan Jumlah Belian">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="">Total</label>
|
||||
<input type="text" class="form-control" placeholder="Rp.50.000" disabled>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" onclick="masukkan_ke_cart()">Masukkan Ke List
|
||||
Pembelian</button>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Javascript -->
|
||||
<script src="assets/bundles/libscripts.bundle.js"></script>
|
||||
<!-- <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> -->
|
||||
@@ -163,10 +409,56 @@
|
||||
|
||||
<!-- <script src="assets/bundles/chartist.bundle.js"></script> -->
|
||||
<script src="template_assets/vendor/toastr/toastr.js"></script>
|
||||
<!--script src="assets/bundles/morrisscripts.bundle.js"></script--><!-- Morris Plugin Js -->
|
||||
<!--script src="assets/bundles/morrisscripts.bundle.js"></script-->
|
||||
<!-- Morris Plugin Js -->
|
||||
|
||||
<script src="assets/bundles/mainscripts.bundle.js"></script>
|
||||
<script src="assets/js/index.js"></script>
|
||||
<script src="assets/dist/js/lightbox.min.js"></script>
|
||||
<script src="template_assets/vendor/sweetalert/sweetalert.js"></script>
|
||||
|
||||
<script>
|
||||
function cari() {
|
||||
//create var input = document.getElementById('input_pencarian_barang');
|
||||
var input = $('#input_pencarian_barang').val();
|
||||
// if input is empty then toastr error on top right ("Masukkan Nama atau Kode Barang") focus to input else toastr success ("Cari Berhasil")
|
||||
if (input == "") {
|
||||
toastr.error('Masukkan Nama atau Kode Barang', 'Error', {
|
||||
timeOut: 5000,
|
||||
"closeButton": true,
|
||||
"debug": false,
|
||||
"newestOnTop": true,
|
||||
"progressBar": true,
|
||||
"positionClass": "toast-top-right",
|
||||
"preventDuplicates": true,
|
||||
"onclick": null,
|
||||
"showDuration": "300",
|
||||
"hideDuration": "1000",
|
||||
"extendedTimeOut": "1000",
|
||||
"showEasing": "swing",
|
||||
"hideEasing": "linear",
|
||||
"showMethod": "fadeIn",
|
||||
"hideMethod": "fadeOut",
|
||||
"tapToDismiss": false
|
||||
});
|
||||
$('#input_pencarian_barang').focus();
|
||||
} else {
|
||||
// show div id=div_pencarian with fadeIn
|
||||
$('.div_pencarian').fadeIn(1000);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
function masukkan_ke_cart() {
|
||||
// hide div id=div_pencarian with fadeOut
|
||||
$('.div_pencarian').fadeOut(1000);
|
||||
// show div id=div_cart_list with fadeIn
|
||||
$('.div_cart_list').fadeIn(1000);
|
||||
//close modal
|
||||
$('.modal').modal('hide');
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,464 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Halaman List Produk - Admin</title>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<meta name="description" content="HexaBit Bootstrap 4x Admin Template">
|
||||
<meta name="author" content="WrapTheme, www.thememakker.com">
|
||||
|
||||
<link rel="icon" href="favicon.ico" type="image/x-icon">
|
||||
<!-- VENDOR CSS -->
|
||||
<link rel="stylesheet" href="template_assets/vendor/bootstrap/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="template_assets/vendor/font-awesome/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="template_assets/vendor/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css">
|
||||
<!-- <link rel="stylesheet" href="template_assets/vendor/chartist/css/chartist.min.css"> -->
|
||||
<!-- <link rel="stylesheet" href="template_assets/vendor/chartist-plugin-tooltip/chartist-plugin-tooltip.css"> -->
|
||||
<link rel="stylesheet" href="template_assets/vendor/toastr/toastr.min.css">
|
||||
<!-- <link rel="stylesheet" href="template_assets/vendor/morrisjs/morris.css" /> -->
|
||||
|
||||
<link rel="stylesheet" href="assets/dist/css/lightbox.min.css">
|
||||
|
||||
<link rel="stylesheet" href="template_assets/vendor/sweetalert/sweetalert.css">
|
||||
|
||||
<link rel="stylesheet" href="template_assets/vendor/jquery-datatable/dataTables.bootstrap4.min.css">
|
||||
|
||||
<!-- MAIN CSS -->
|
||||
<link rel="stylesheet" href="assets/css/main.css">
|
||||
<link rel="stylesheet" href="assets/css/color_skins.css">
|
||||
</head>
|
||||
|
||||
<body class="theme-cyan">
|
||||
|
||||
<!-- Page Loader -->
|
||||
<div class="page-loader-wrapper">
|
||||
<div class="loader">
|
||||
<div class="m-t-30"><img src="template_assets/images/icon-light.svg" width="48" height="48" alt="HexaBit">
|
||||
</div>
|
||||
<p>Loading...</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Overlay For Sidebars -->
|
||||
<div class="overlay"></div>
|
||||
|
||||
<div id="wrapper">
|
||||
|
||||
<nav class="navbar navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="navbar-left">
|
||||
<div class="navbar-btn">
|
||||
<a href="index.html"><img src="template_assets/images/icon-light.svg" alt="HexaBit Logo"
|
||||
class="img-fluid logo"></a>
|
||||
<button type="button" class="btn-toggle-offcanvas"><i
|
||||
class="lnr lnr-menu fa fa-bars"></i></button>
|
||||
</div>
|
||||
<a href="javascript:void(0);" class="icon-menu btn-toggle-fullwidth"><i
|
||||
class="fa fa-arrow-left"></i></a>
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="dropdown dropdown-animated scale-right">
|
||||
<a href="javascript:void(0);" class="dropdown-toggle icon-menu" data-toggle="dropdown"><i
|
||||
class="icon-grid"></i></a>
|
||||
<ul class="dropdown-menu menu-icon app_menu">
|
||||
<li>
|
||||
<a class="#">
|
||||
<i class="icon-envelope"></i>
|
||||
<span>Halaman Penjualan</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="#">
|
||||
<i class="icon-bubbles"></i>
|
||||
<span>Laporan </span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="navbar-right">
|
||||
<!-- <form id="navbar-search" class="navbar-form search-form">
|
||||
<input value="" class="form-control" placeholder="Search here..." type="text">
|
||||
<button type="button" class="btn btn-default"><i class="icon-magnifier"></i></button>
|
||||
</form> -->
|
||||
|
||||
<div id="navbar-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="page-login.html" class="icon-menu"><i class="icon-power"></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
<div id="left-sidebar" class="sidebar">
|
||||
<div class="navbar-brand">
|
||||
<a href="index.html"><img src="template_assets/images/icon-light.svg" alt="HexaBit Logo"
|
||||
class="img-fluid logo"><span>Kicap Karan</span></a>
|
||||
<button type="button" class="btn-toggle-offcanvas btn btn-sm btn-default float-right"><i
|
||||
class="lnr lnr-menu fa fa-chevron-circle-left"></i></button>
|
||||
</div>
|
||||
<div class="sidebar-scroll">
|
||||
<div class="user-account">
|
||||
<div class="user_div">
|
||||
<img src="template_assets/images/user.png" class="user-photo" alt="User Profile Picture">
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<span>Welcome,</span>
|
||||
<a href="javascript:void(0);" class="dropdown-toggle user-name"
|
||||
data-toggle="dropdown"><strong>Christy
|
||||
Wert</strong></a>
|
||||
<ul class="dropdown-menu dropdown-menu-right account">
|
||||
<li><a href="page-profile.html"><i class="icon-user"></i>My Profile</a></li>
|
||||
<li><a href="app-inbox.html"><i class="icon-envelope-open"></i>Messages</a></li>
|
||||
<li><a href="javascript:void(0);"><i class="icon-settings"></i>Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="page-login.html"><i class="icon-power"></i>Logout</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="left-sidebar-nav" class="sidebar-nav">
|
||||
<ul id="main-menu" class="metismenu">
|
||||
<li><a href="index.html"><i class=" icon-basket-loaded"></i><span>Halaman
|
||||
Penjualan</span></a></li>
|
||||
<li><a href="penambahan_produk.html"><i class="fa fa-edit"></i><span>Produk Baru</span></a></li>
|
||||
<li class="active"><a href="list_produk.html"><i class=" icon-list"></i><span>List
|
||||
Produk</span></a></li>
|
||||
<li><a href="laporan.html"><i class="icon-book-open"></i><span>Log Laporan</span></a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="main-content">
|
||||
<div class="block-header">
|
||||
<div class="row clearfix">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<h2>Halaman List Produk</h2>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12 text-right">
|
||||
<ul class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="index.html"><i class="icon-home"></i></a></li>
|
||||
<li class="breadcrumb-item active">Halaman List Produk</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<!-- SINI MAIN NYA -->
|
||||
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-12">
|
||||
<div class="card">
|
||||
<div class="header">
|
||||
<h2>List Produk<small><i>Masukkan Kode @ Nama Produk Pada <b>Search</b> Jika Ingin
|
||||
Mencari Produk </i></small>
|
||||
</h2>
|
||||
<ul class="header-dropdown dropdown dropdown-animated scale-left">
|
||||
<li>
|
||||
<a href="javascript:void(0);" class="full-screen">
|
||||
<i class="icon-size-fullscreen"></i>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="body">
|
||||
<div class="table-responsive">
|
||||
<table
|
||||
class="table table-bordered table-hover js-basic-example dataTable table-custom">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Kode</th>
|
||||
<th>Nama</th>
|
||||
<th>Stok</th>
|
||||
<th>Harga Penjualan</th>
|
||||
<th>Aksi</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>A4567</td>
|
||||
<td>Adidas Merah</td>
|
||||
<td>15</td>
|
||||
<td>Rp. 50,000</td>
|
||||
<td>
|
||||
<button class="btn btn-sm round btn-outline-primary"
|
||||
data-toggle="modal" data-target="#exampleModal"
|
||||
title="Tambah Stok Produk">
|
||||
<span class="sr-only"></span>
|
||||
<i class="fa fa-edit"></i>
|
||||
</button>
|
||||
|
||||
<a class="example-image-link"
|
||||
href="template_assets/images/baju/contoh_baju.jpg"
|
||||
data-lightbox="example-1">
|
||||
<button class="btn btn-sm round btn-outline-success"
|
||||
title="Lihat Foto Produk">
|
||||
<span class="sr-only"></span>
|
||||
<i class="fa fa-file-image-o"></i>
|
||||
</button>
|
||||
</a>
|
||||
<button class="btn btn-sm round btn-outline-info"
|
||||
data-toggle="modal" data-target="#exampleModal1"
|
||||
title="Lihat Laporan Produk">
|
||||
<span class="sr-only"></span>
|
||||
<i class="fa fa-list"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>A5678</td>
|
||||
<td>Adidas Putih</td>
|
||||
<td>15</td>
|
||||
<td>Rp. 50,000</td>
|
||||
<td>
|
||||
<button class="btn btn-sm round btn-outline-primary"
|
||||
data-toggle="modal" data-target="#exampleModal"
|
||||
title="Tambah Stok Produk">
|
||||
<span class="sr-only"></span>
|
||||
<i class="fa fa-edit"></i>
|
||||
</button>
|
||||
|
||||
<a class="example-image-link"
|
||||
href="template_assets/images/baju/contoh_baju.jpg"
|
||||
data-lightbox="example-1">
|
||||
<button class="btn btn-sm round btn-outline-success"
|
||||
title="Lihat Foto Produk">
|
||||
<span class="sr-only"></span>
|
||||
<i class="fa fa-file-image-o"></i>
|
||||
</button>
|
||||
</a>
|
||||
<button class="btn btn-sm round btn-outline-info"
|
||||
data-toggle="modal" data-target="#exampleModal1"
|
||||
title="Lihat Laporan Produk">
|
||||
<span class="sr-only"></span>
|
||||
<i class="fa fa-list"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>A6789</td>
|
||||
<td>Adidas Hijau</td>
|
||||
<td>15</td>
|
||||
<td>Rp. 50,000</td>
|
||||
<td>
|
||||
<button class="btn btn-sm round btn-outline-primary"
|
||||
data-toggle="modal" data-target="#exampleModal"
|
||||
title="Tambah Stok Produk">
|
||||
<span class="sr-only"></span>
|
||||
<i class="fa fa-edit"></i>
|
||||
</button>
|
||||
|
||||
<a class="example-image-link"
|
||||
href="template_assets/images/baju/contoh_baju.jpg"
|
||||
data-lightbox="example-1">
|
||||
<button class="btn btn-sm round btn-outline-success"
|
||||
title="Lihat Foto Produk">
|
||||
<span class="sr-only"></span>
|
||||
<i class="fa fa-file-image-o"></i>
|
||||
</button>
|
||||
</a>
|
||||
<button class="btn btn-sm round btn-outline-info"
|
||||
data-toggle="modal" data-target="#exampleModal1"
|
||||
title="Lihat Laporan Produk">
|
||||
<span class="sr-only"></span>
|
||||
<i class="fa fa-list"></i>
|
||||
</button>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="exampleModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">Penambahan Stok Produk</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group text-center">
|
||||
<img src="template_assets/images/baju/contoh_baju.jpg" alt="" width="150px" height="200px">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="">Kode</label>
|
||||
<input type="text" class="form-control" value="A4567" disabled>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="">Nama</label>
|
||||
<input type="text" class="form-control" value="Adidas Merah" disabled>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="">Harga</label>
|
||||
<input type="text" class="form-control" value="Rp 50,000" disabled>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="">Jumlah Stok Sekarang</label>
|
||||
<input type="text" class="form-control" placeholder="15" disabled>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="">Penambahan Stok</label>
|
||||
<input type="text" class="form-control" placeholder="Masukkan Jumlah Penambahan Stok">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="">Harga Pembelian Penambahan Stok</label>
|
||||
<input type="text" class="form-control" placeholder="Masukkan Harga Pembelian Penambahan Stok">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="">Total Stok</label>
|
||||
<input type="text" class="form-control" value="25" disabled>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" onclick="tambah_stok()">Tambah Stok</button>
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal fade" id="exampleModal1" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="exampleModalLabel">Log Laporan Produk</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group text-center">
|
||||
<img src="template_assets/images/baju/contoh_baju.jpg" alt="" width="150px" height="200px">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="">Kode</label>
|
||||
<input type="text" class="form-control" value="A4567" disabled>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="">Nama</label>
|
||||
<input type="text" class="form-control" value="Adidas Merah" disabled>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-bordered table-hover js-basic-example dataTable table-custom">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Tanggal</th>
|
||||
<th>Status</th>
|
||||
<th>Stok Sebelumnya</th>
|
||||
<th>Stok Terkini</th>
|
||||
<th>Keterangan</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Rabu | 21-10-2021</td>
|
||||
<td>Penjualan</td>
|
||||
<td>25</td>
|
||||
<td>23</td>
|
||||
<td>
|
||||
Jumlah Penjualan : 2 <br>
|
||||
Harga Pembelian : Rp. 75,000 <br>
|
||||
Uang Pembayaran : Rp. 100,000 <br>
|
||||
Kembalian : Rp. 25,000
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Rabu | 21-10-2021</td>
|
||||
<td>Penambahan Stok</td>
|
||||
<td>10</td>
|
||||
<td>40</td>
|
||||
<td>
|
||||
Jumlah Penambahan : 30 <br>
|
||||
Harga Pembelian Stok : Rp. 3,000,000 <br>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td>Rabu | 21-10-2021</td>
|
||||
<td>Penjualan</td>
|
||||
<td>25</td>
|
||||
<td>23</td>
|
||||
<td>
|
||||
Jumlah Pembelian : 2 <br>
|
||||
Harga Pembelian : Rp. 75,000 <br>
|
||||
Uang Pembayaran : Rp. 100,000 <br>
|
||||
Kembalian : Rp. 25,000
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Javascript -->
|
||||
<script src="assets/bundles/libscripts.bundle.js"></script>
|
||||
<!-- <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> -->
|
||||
<script src="assets/bundles/vendorscripts.bundle.js"></script>
|
||||
|
||||
<!-- <script src="assets/bundles/chartist.bundle.js"></script> -->
|
||||
<script src="template_assets/vendor/toastr/toastr.js"></script>
|
||||
<!--script src="assets/bundles/morrisscripts.bundle.js"></script-->
|
||||
<!-- Morris Plugin Js -->
|
||||
|
||||
<script src="assets/bundles/mainscripts.bundle.js"></script>
|
||||
<script src="assets/js/index.js"></script>
|
||||
<script src="assets/dist/js/lightbox.min.js"></script>
|
||||
<script src="template_assets/vendor/sweetalert/sweetalert.js"></script>
|
||||
<script src="assets/bundles/datatablescripts.bundle.js"></script>
|
||||
<script src="template_assets/vendor/jquery-datatable/buttons/dataTables.buttons.min.js"></script>
|
||||
<script src="template_assets/vendor/jquery-datatable/buttons/buttons.bootstrap4.min.js"></script>
|
||||
|
||||
<script>
|
||||
//datatable class table
|
||||
$(document).ready(function () {
|
||||
$('.table').DataTable();
|
||||
});
|
||||
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,262 @@
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<title>Halaman Penambahan Produk Baru - Admin</title>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=Edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
|
||||
<meta name="description" content="HexaBit Bootstrap 4x Admin Template">
|
||||
<meta name="author" content="WrapTheme, www.thememakker.com">
|
||||
|
||||
<link rel="icon" href="favicon.ico" type="image/x-icon">
|
||||
<!-- VENDOR CSS -->
|
||||
<link rel="stylesheet" href="template_assets/vendor/bootstrap/css/bootstrap.min.css">
|
||||
<link rel="stylesheet" href="template_assets/vendor/font-awesome/css/font-awesome.min.css">
|
||||
<link rel="stylesheet" href="template_assets/vendor/bootstrap-progressbar/css/bootstrap-progressbar-3.3.4.min.css">
|
||||
<!-- <link rel="stylesheet" href="template_assets/vendor/chartist/css/chartist.min.css"> -->
|
||||
<!-- <link rel="stylesheet" href="template_assets/vendor/chartist-plugin-tooltip/chartist-plugin-tooltip.css"> -->
|
||||
<link rel="stylesheet" href="template_assets/vendor/toastr/toastr.min.css">
|
||||
<!-- <link rel="stylesheet" href="template_assets/vendor/morrisjs/morris.css" /> -->
|
||||
|
||||
<link rel="stylesheet" href="assets/dist/css/lightbox.min.css">
|
||||
|
||||
<link rel="stylesheet" href="template_assets/vendor/sweetalert/sweetalert.css">
|
||||
|
||||
<!-- MAIN CSS -->
|
||||
<link rel="stylesheet" href="assets/css/main.css">
|
||||
<link rel="stylesheet" href="assets/css/color_skins.css">
|
||||
</head>
|
||||
|
||||
<body class="theme-cyan">
|
||||
|
||||
<!-- Page Loader -->
|
||||
<div class="page-loader-wrapper">
|
||||
<div class="loader">
|
||||
<div class="m-t-30"><img src="template_assets/images/icon-light.svg" width="48" height="48" alt="HexaBit">
|
||||
</div>
|
||||
<p>Loading...</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Overlay For Sidebars -->
|
||||
<div class="overlay"></div>
|
||||
|
||||
<div id="wrapper">
|
||||
|
||||
<nav class="navbar navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
|
||||
<div class="navbar-left">
|
||||
<div class="navbar-btn">
|
||||
<a href="index.html"><img src="template_assets/images/icon-light.svg" alt="HexaBit Logo"
|
||||
class="img-fluid logo"></a>
|
||||
<button type="button" class="btn-toggle-offcanvas"><i
|
||||
class="lnr lnr-menu fa fa-bars"></i></button>
|
||||
</div>
|
||||
<a href="javascript:void(0);" class="icon-menu btn-toggle-fullwidth"><i
|
||||
class="fa fa-arrow-left"></i></a>
|
||||
<ul class="nav navbar-nav">
|
||||
<li class="dropdown dropdown-animated scale-right">
|
||||
<a href="javascript:void(0);" class="dropdown-toggle icon-menu" data-toggle="dropdown"><i
|
||||
class="icon-grid"></i></a>
|
||||
<ul class="dropdown-menu menu-icon app_menu">
|
||||
<li>
|
||||
<a class="#">
|
||||
<i class="icon-envelope"></i>
|
||||
<span>Halaman Penjualan</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a class="#">
|
||||
<i class="icon-bubbles"></i>
|
||||
<span>Laporan </span>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="navbar-right">
|
||||
<!-- <form id="navbar-search" class="navbar-form search-form">
|
||||
<input value="" class="form-control" placeholder="Search here..." type="text">
|
||||
<button type="button" class="btn btn-default"><i class="icon-magnifier"></i></button>
|
||||
</form> -->
|
||||
|
||||
<div id="navbar-menu">
|
||||
<ul class="nav navbar-nav">
|
||||
|
||||
<li><a href="page-login.html" class="icon-menu"><i class="icon-power"></i></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
<div id="left-sidebar" class="sidebar">
|
||||
<div class="navbar-brand">
|
||||
<a href="index.html"><img src="template_assets/images/icon-light.svg" alt="HexaBit Logo"
|
||||
class="img-fluid logo"><span>Kicap Karan</span></a>
|
||||
<button type="button" class="btn-toggle-offcanvas btn btn-sm btn-default float-right"><i
|
||||
class="lnr lnr-menu fa fa-chevron-circle-left"></i></button>
|
||||
</div>
|
||||
<div class="sidebar-scroll">
|
||||
<div class="user-account">
|
||||
<div class="user_div">
|
||||
<img src="template_assets/images/user.png" class="user-photo" alt="User Profile Picture">
|
||||
</div>
|
||||
<div class="dropdown">
|
||||
<span>Welcome,</span>
|
||||
<a href="javascript:void(0);" class="dropdown-toggle user-name"
|
||||
data-toggle="dropdown"><strong>Christy
|
||||
Wert</strong></a>
|
||||
<ul class="dropdown-menu dropdown-menu-right account">
|
||||
<li><a href="page-profile.html"><i class="icon-user"></i>My Profile</a></li>
|
||||
<li><a href="app-inbox.html"><i class="icon-envelope-open"></i>Messages</a></li>
|
||||
<li><a href="javascript:void(0);"><i class="icon-settings"></i>Settings</a></li>
|
||||
<li class="divider"></li>
|
||||
<li><a href="page-login.html"><i class="icon-power"></i>Logout</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<nav id="left-sidebar-nav" class="sidebar-nav">
|
||||
<ul id="main-menu" class="metismenu">
|
||||
<li><a href="index.html"><i class=" icon-basket-loaded"></i><span>Halaman
|
||||
Penjualan</span></a></li>
|
||||
<li class="active"><a href="penambahan_produk.html"><i class="fa fa-edit"></i><span>
|
||||
Produk Baru</span></a></li>
|
||||
<li><a href="list_produk.html"><i class=" icon-list"></i><span>List Produk</span></a></li>
|
||||
<li><a href="laporan.html"><i class="icon-book-open"></i><span>Log Laporan</span></a></li>
|
||||
|
||||
|
||||
|
||||
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="main-content">
|
||||
<div class="block-header">
|
||||
<div class="row clearfix">
|
||||
<div class="col-md-6 col-sm-12">
|
||||
<h2>Halaman Penambahan Produk Baru</h2>
|
||||
</div>
|
||||
<div class="col-md-6 col-sm-12 text-right">
|
||||
<ul class="breadcrumb">
|
||||
<li class="breadcrumb-item"><a href="index.html"><i class="icon-home"></i></a></li>
|
||||
<li class="breadcrumb-item active">Halaman Penambahan Produk Baru</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="container-fluid">
|
||||
<!-- SINI MAIN NYA -->
|
||||
|
||||
<div class="row clearfix">
|
||||
<div class="col-lg-3 col-md-1"></div>
|
||||
|
||||
<div class="col-lg-6 col-md-10">
|
||||
<div class="card">
|
||||
<div class="body">
|
||||
<div class="form-group">
|
||||
<label>Foto Produk</label>
|
||||
<input type="file" class="form-control" placeholder="Masukkan Kode Produk">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Kode Produk</label>
|
||||
<input type="text" class="form-control" placeholder="Masukkan Kode Produk">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Nama Produk</label>
|
||||
<input type="text" class="form-control" placeholder="Masukkan Nama Produk">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Harga Produk <i>(Per Helai)</i></label>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">Rp.</span>
|
||||
</div>
|
||||
<input type="text" class="form-control"
|
||||
placeholder="Masukkan Harga Produk per Helai">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Jumlah Stok</label>
|
||||
<input type="text" class="form-control" placeholder="Masukkan Jumlah Stok Produk">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label>Pembelian Stok</label>
|
||||
<div class="input-group mb-3">
|
||||
<div class="input-group-prepend">
|
||||
<span class="input-group-text">Rp.</span>
|
||||
</div>
|
||||
<input type="text" class="form-control"
|
||||
placeholder="Masukkan Harga Pembelian Stok">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group text-center">
|
||||
<button class="btn btn-primary text-center" onclick="tambah_produk_baru()">Tambah
|
||||
Produk Baru</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3 col-md-1"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<!-- Javascript -->
|
||||
<script src="assets/bundles/libscripts.bundle.js"></script>
|
||||
<!-- <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> -->
|
||||
<script src="assets/bundles/vendorscripts.bundle.js"></script>
|
||||
|
||||
<!-- <script src="assets/bundles/chartist.bundle.js"></script> -->
|
||||
<script src="template_assets/vendor/toastr/toastr.js"></script>
|
||||
<!--script src="assets/bundles/morrisscripts.bundle.js"></script-->
|
||||
<!-- Morris Plugin Js -->
|
||||
|
||||
<script src="assets/bundles/mainscripts.bundle.js"></script>
|
||||
<script src="assets/js/index.js"></script>
|
||||
<script src="assets/dist/js/lightbox.min.js"></script>
|
||||
<script src="template_assets/vendor/sweetalert/sweetalert.js"></script>
|
||||
|
||||
<script>
|
||||
function tambah_produk_baru() {
|
||||
// icon info, text "Yakin ingin menambah produk ini?", title "Tambah Produk", button "Ya" dan "Tidak"
|
||||
swal({
|
||||
title: "Tambah Produk Baru",
|
||||
text: "Yakin ingin menambah produk ini?",
|
||||
icon: "info",
|
||||
buttons: true,
|
||||
// dangerMode: true,
|
||||
}).
|
||||
then((willDelete) => {
|
||||
if (willDelete) {
|
||||
swal("Produk berhasil ditambahkan!", {
|
||||
icon: "success",
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
Binary file not shown.
File diff suppressed because it is too large.
Load diff
+773
-770
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1 @@
|
||||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.swal=e():t.swal=e()}(this,function(){return function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=8)}([function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o="swal-button";e.CLASS_NAMES={MODAL:"swal-modal",OVERLAY:"swal-overlay",SHOW_MODAL:"swal-overlay--show-modal",MODAL_TITLE:"swal-title",MODAL_TEXT:"swal-text",ICON:"swal-icon",ICON_CUSTOM:"swal-icon--custom",CONTENT:"swal-content",FOOTER:"swal-footer",BUTTON_CONTAINER:"swal-button-container",BUTTON:o,CONFIRM_BUTTON:o+"--confirm",CANCEL_BUTTON:o+"--cancel",DANGER_BUTTON:o+"--danger",BUTTON_LOADING:o+"--loading",BUTTON_LOADER:o+"__loader"},e.default=e.CLASS_NAMES},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getNode=function(t){var e="."+t;return document.querySelector(e)},e.stringToNode=function(t){var e=document.createElement("div");return e.innerHTML=t.trim(),e.firstChild},e.insertAfter=function(t,e){var n=e.nextSibling;e.parentNode.insertBefore(t,n)},e.removeNode=function(t){t.parentElement.removeChild(t)},e.throwErr=function(t){throw t=t.replace(/ +(?= )/g,""),"SweetAlert: "+(t=t.trim())},e.isPlainObject=function(t){if("[object Object]"!==Object.prototype.toString.call(t))return!1;var e=Object.getPrototypeOf(t);return null===e||e===Object.prototype},e.ordinalSuffixOf=function(t){var e=t%10,n=t%100;return 1===e&&11!==n?t+"st":2===e&&12!==n?t+"nd":3===e&&13!==n?t+"rd":t+"th"}},function(t,e,n){"use strict";function o(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}Object.defineProperty(e,"__esModule",{value:!0}),o(n(25));var r=n(26);e.overlayMarkup=r.default,o(n(27)),o(n(28)),o(n(29));var i=n(0),a=i.default.MODAL_TITLE,s=i.default.MODAL_TEXT,c=i.default.ICON,l=i.default.FOOTER;e.iconMarkup='\n <div class="'+c+'"></div>',e.titleMarkup='\n <div class="'+a+'"></div>\n',e.textMarkup='\n <div class="'+s+'"></div>',e.footerMarkup='\n <div class="'+l+'"></div>\n'},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1);e.CONFIRM_KEY="confirm",e.CANCEL_KEY="cancel";var r={visible:!0,text:null,value:null,className:"",closeModal:!0},i=Object.assign({},r,{visible:!1,text:"Cancel",value:null}),a=Object.assign({},r,{text:"OK",value:!0});e.defaultButtonList={cancel:i,confirm:a};var s=function(t){switch(t){case e.CONFIRM_KEY:return a;case e.CANCEL_KEY:return i;default:var n=t.charAt(0).toUpperCase()+t.slice(1);return Object.assign({},r,{text:n,value:t})}},c=function(t,e){var n=s(t);return!0===e?Object.assign({},n,{visible:!0}):"string"==typeof e?Object.assign({},n,{visible:!0,text:e}):o.isPlainObject(e)?Object.assign({visible:!0},n,e):Object.assign({},n,{visible:!1})},l=function(t){for(var e={},n=0,o=Object.keys(t);n<o.length;n++){var r=o[n],a=t[r],s=c(r,a);e[r]=s}return e.cancel||(e.cancel=i),e},u=function(t){var n={};switch(t.length){case 1:n[e.CANCEL_KEY]=Object.assign({},i,{visible:!1});break;case 2:n[e.CANCEL_KEY]=c(e.CANCEL_KEY,t[0]),n[e.CONFIRM_KEY]=c(e.CONFIRM_KEY,t[1]);break;default:o.throwErr("Invalid number of 'buttons' in array ("+t.length+").\n If you want more than 2 buttons, you need to use an object!")}return n};e.getButtonListOpts=function(t){var n=e.defaultButtonList;return"string"==typeof t?n[e.CONFIRM_KEY]=c(e.CONFIRM_KEY,t):Array.isArray(t)?n=u(t):o.isPlainObject(t)?n=l(t):!0===t?n=u([!0,!0]):!1===t?n=u([!1,!1]):void 0===t&&(n=e.defaultButtonList),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(1),r=n(2),i=n(0),a=i.default.MODAL,s=i.default.OVERLAY,c=n(30),l=n(31),u=n(32),f=n(33);e.injectElIntoModal=function(t){var e=o.getNode(a),n=o.stringToNode(t);return e.appendChild(n),n};var d=function(t){t.className=a,t.textContent=""},p=function(t,e){d(t);var n=e.className;n&&t.classList.add(n)};e.initModalContent=function(t){var e=o.getNode(a);p(e,t),c.default(t.icon),l.initTitle(t.title),l.initText(t.text),f.default(t.content),u.default(t.buttons,t.dangerMode)};var m=function(){var t=o.getNode(s),e=o.stringToNode(r.modalMarkup);t.appendChild(e)};e.default=m},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var o=n(3),r={isOpen:!1,promise:null,actions:{},timer:null},i=Object.assign({},r);e.resetState=function(){i=Object.assign({},r)},e.setActionValue=function(t){if("string"==typeof t)return a(o.CONFIRM_KEY,t);for(var e in t)a(e,t[e])};var a=function(t,e){i.actions[t]||(i.actions[t]={}),Object.assign(i.actions[t],{vLine truncated
|
||||
+1
-541
@@ -1,541 +1 @@
|
||||
! function(e, t, n) {
|
||||
"use strict";
|
||||
! function o(e, t, n) {
|
||||
function a(s, l) {
|
||||
if (!t[s]) {
|
||||
if (!e[s]) {
|
||||
var i = "function" == typeof require && require;
|
||||
if (!l && i) return i(s, !0);
|
||||
if (r) return r(s, !0);
|
||||
var u = new Error("Cannot find module '" + s + "'");
|
||||
throw u.code = "MODULE_NOT_FOUND", u
|
||||
}
|
||||
var c = t[s] = {
|
||||
exports: {}
|
||||
};
|
||||
e[s][0].call(c.exports, function(t) {
|
||||
var n = e[s][1][t];
|
||||
return a(n ? n : t)
|
||||
}, c, c.exports, o, e, t, n)
|
||||
}
|
||||
return t[s].exports
|
||||
}
|
||||
for (var r = "function" == typeof require && require, s = 0; s < n.length; s++) a(n[s]);
|
||||
return a
|
||||
}({
|
||||
1: [function(o, a, r) {
|
||||
var s = function(e) {
|
||||
return e && e.__esModule ? e : {
|
||||
"default": e
|
||||
}
|
||||
};
|
||||
Object.defineProperty(r, "__esModule", {
|
||||
value: !0
|
||||
});
|
||||
var l, i, u, c, d = o("./modules/handle-dom"),
|
||||
f = o("./modules/utils"),
|
||||
p = o("./modules/handle-swal-dom"),
|
||||
m = o("./modules/handle-click"),
|
||||
v = o("./modules/handle-key"),
|
||||
y = s(v),
|
||||
h = o("./modules/default-params"),
|
||||
b = s(h),
|
||||
g = o("./modules/set-params"),
|
||||
w = s(g);
|
||||
r["default"] = u = c = function() {
|
||||
function o(e) {
|
||||
var t = a;
|
||||
return t[e] === n ? b["default"][e] : t[e]
|
||||
}
|
||||
var a = arguments[0];
|
||||
if (d.addClass(t.body, "stop-scrolling"), p.resetInput(), a === n) return f.logStr("SweetAlert expects at least 1 attribute!"), !1;
|
||||
var r = f.extend({}, b["default"]);
|
||||
switch (typeof a) {
|
||||
case "string":
|
||||
r.title = a, r.text = arguments[1] || "", r.type = arguments[2] || "";
|
||||
break;
|
||||
case "object":
|
||||
if (a.title === n) return f.logStr('Missing "title" argument!'), !1;
|
||||
r.title = a.title;
|
||||
for (var s in b["default"]) r[s] = o(s);
|
||||
r.confirmButtonText = r.showCancelButton ? "Confirm" : b["default"].confirmButtonText, r.confirmButtonText = o("confirmButtonText"), r.doneFunction = arguments[1] || null;
|
||||
break;
|
||||
default:
|
||||
return f.logStr('Unexpected type of argument! Expected "string" or "object", got ' + typeof a), !1
|
||||
}
|
||||
w["default"](r), p.fixVerticalPosition(), p.openModal(arguments[1]);
|
||||
for (var u = p.getModal(), v = u.querySelectorAll("button"), h = ["onclick", "onmouseover", "onmouseout", "onmousedown", "onmouseup", "onfocus"], g = function(e) {
|
||||
return m.handleButton(e, r, u)
|
||||
}, C = 0; C < v.length; C++)
|
||||
for (var S = 0; S < h.length; S++) {
|
||||
var x = h[S];
|
||||
v[C][x] = g
|
||||
}
|
||||
p.getOverlay().onclick = g, l = e.onkeydown;
|
||||
var k = function(e) {
|
||||
return y["default"](e, r, u)
|
||||
};
|
||||
e.onkeydown = k, e.onfocus = function() {
|
||||
setTimeout(function() {
|
||||
i !== n && (i.focus(), i = n)
|
||||
}, 0)
|
||||
}, c.enableButtons()
|
||||
}, u.setDefaults = c.setDefaults = function(e) {
|
||||
if (!e) throw new Error("userParams is required");
|
||||
if ("object" != typeof e) throw new Error("userParams has to be a object");
|
||||
f.extend(b["default"], e)
|
||||
}, u.close = c.close = function() {
|
||||
var o = p.getModal();
|
||||
d.fadeOut(p.getOverlay(), 5), d.fadeOut(o, 5), d.removeClass(o, "showSweetAlert"), d.addClass(o, "hideSweetAlert"), d.removeClass(o, "visible");
|
||||
var a = o.querySelector(".sa-icon.sa-success");
|
||||
d.removeClass(a, "animate"), d.removeClass(a.querySelector(".sa-tip"), "animateSuccessTip"), d.removeClass(a.querySelector(".sa-long"), "animateSuccessLong");
|
||||
var r = o.querySelector(".sa-icon.sa-error");
|
||||
d.removeClass(r, "animateErrorIcon"), d.removeClass(r.querySelector(".sa-x-mark"), "animateXMark");
|
||||
var s = o.querySelector(".sa-icon.sa-warning");
|
||||
return d.removeClass(s, "pulseWarning"), d.removeClass(s.querySelector(".sa-body"), "pulseWarningIns"), d.removeClass(s.querySelector(".sa-dot"), "pulseWarningIns"), setTimeout(function() {
|
||||
var e = o.getAttribute("data-custom-class");
|
||||
d.removeClass(o, e)
|
||||
}, 300), d.removeClass(t.body, "stop-scrolling"), e.onkeydown = l, e.previousActiveElement && e.previousActiveElement.focus(), i = n, clearTimeout(o.timeout), !0
|
||||
}, u.showInputError = c.showInputError = function(e) {
|
||||
var t = p.getModal(),
|
||||
n = t.querySelector(".sa-input-error");
|
||||
d.addClass(n, "show");
|
||||
var o = t.querySelector(".sa-error-container");
|
||||
d.addClass(o, "show"), o.querySelector("p").innerHTML = e, setTimeout(function() {
|
||||
u.enableButtons()
|
||||
}, 1), t.querySelector("input").focus()
|
||||
}, u.resetInputError = c.resetInputError = function(e) {
|
||||
if (e && 13 === e.keyCode) return !1;
|
||||
var t = p.getModal(),
|
||||
n = t.querySelector(".sa-input-error");
|
||||
d.removeClass(n, "show");
|
||||
var o = t.querySelector(".sa-error-container");
|
||||
d.removeClass(o, "show")
|
||||
}, u.disableButtons = c.disableButtons = function() {
|
||||
var e = p.getModal(),
|
||||
t = e.querySelector("button.confirm"),
|
||||
n = e.querySelector("button.cancel");
|
||||
t.disabled = !0, n.disabled = !0
|
||||
}, u.enableButtons = c.enableButtons = function() {
|
||||
var e = p.getModal(),
|
||||
t = e.querySelector("button.confirm"),
|
||||
n = e.querySelector("button.cancel");
|
||||
t.disabled = !1, n.disabled = !1
|
||||
}, "undefined" != typeof e ? e.sweetAlert = e.swal = u : f.logStr("SweetAlert is a frontend module!"), a.exports = r["default"]
|
||||
}, {
|
||||
"./modules/default-params": 2,
|
||||
"./modules/handle-click": 3,
|
||||
"./modules/handle-dom": 4,
|
||||
"./modules/handle-key": 5,
|
||||
"./modules/handle-swal-dom": 6,
|
||||
"./modules/set-params": 8,
|
||||
"./modules/utils": 9
|
||||
}],
|
||||
2: [function(e, t, n) {
|
||||
Object.defineProperty(n, "__esModule", {
|
||||
value: !0
|
||||
});
|
||||
var o = {
|
||||
title: "",
|
||||
text: "",
|
||||
type: null,
|
||||
allowOutsideClick: !1,
|
||||
showConfirmButton: !0,
|
||||
showCancelButton: !1,
|
||||
closeOnConfirm: !0,
|
||||
closeOnCancel: !0,
|
||||
confirmButtonText: "OK",
|
||||
confirmButtonColor: "#007bff",
|
||||
cancelButtonText: "Cancel",
|
||||
imageUrl: null,
|
||||
imageSize: null,
|
||||
timer: null,
|
||||
customClass: "",
|
||||
html: !1,
|
||||
animation: !0,
|
||||
allowEscapeKey: !0,
|
||||
inputType: "text",
|
||||
inputPlaceholder: "",
|
||||
inputValue: "",
|
||||
showLoaderOnConfirm: !1
|
||||
};
|
||||
n["default"] = o, t.exports = n["default"]
|
||||
}, {}],
|
||||
3: [function(t, n, o) {
|
||||
Object.defineProperty(o, "__esModule", {
|
||||
value: !0
|
||||
});
|
||||
var a = t("./utils"),
|
||||
r = (t("./handle-swal-dom"), t("./handle-dom")),
|
||||
s = function(t, n, o) {
|
||||
function s(e) {
|
||||
m && n.confirmButtonColor && (p.style.backgroundColor = e)
|
||||
}
|
||||
var u, c, d, f = t || e.event,
|
||||
p = f.target || f.srcElement,
|
||||
m = -1 !== p.className.indexOf("confirm"),
|
||||
v = -1 !== p.className.indexOf("sweet-overlay"),
|
||||
y = r.hasClass(o, "visible"),
|
||||
h = n.doneFunction && "true" === o.getAttribute("data-has-done-function");
|
||||
switch (m && n.confirmButtonColor && (u = n.confirmButtonColor, c = a.colorLuminance(u, -.04), d = a.colorLuminance(u, -.14)), f.type) {
|
||||
case "mouseover":
|
||||
s(c);
|
||||
break;
|
||||
case "mouseout":
|
||||
s(u);
|
||||
break;
|
||||
case "mousedown":
|
||||
s(d);
|
||||
break;
|
||||
case "mouseup":
|
||||
s(c);
|
||||
break;
|
||||
case "focus":
|
||||
var b = o.querySelector("button.confirm"),
|
||||
g = o.querySelector("button.cancel");
|
||||
m ? g.style.boxShadow = "none" : b.style.boxShadow = "none";
|
||||
break;
|
||||
case "click":
|
||||
var w = o === p,
|
||||
C = r.isDescendant(o, p);
|
||||
if (!w && !C && y && !n.allowOutsideClick) break;
|
||||
m && h && y ? l(o, n) : h && y || v ? i(o, n) : r.isDescendant(o, p) && "BUTTON" === p.tagName && sweetAlert.close()
|
||||
}
|
||||
},
|
||||
l = function(e, t) {
|
||||
var n = !0;
|
||||
r.hasClass(e, "show-input") && (n = e.querySelector("input").value, n || (n = "")), t.doneFunction(n), t.closeOnConfirm && sweetAlert.close(), t.showLoaderOnConfirm && sweetAlert.disableButtons()
|
||||
},
|
||||
i = function(e, t) {
|
||||
var n = String(t.doneFunction).replace(/\s/g, ""),
|
||||
o = "function(" === n.substring(0, 9) && ")" !== n.substring(9, 10);
|
||||
o && t.doneFunction(!1), t.closeOnCancel && sweetAlert.close()
|
||||
};
|
||||
o["default"] = {
|
||||
handleButton: s,
|
||||
handleConfirm: l,
|
||||
handleCancel: i
|
||||
}, n.exports = o["default"]
|
||||
}, {
|
||||
"./handle-dom": 4,
|
||||
"./handle-swal-dom": 6,
|
||||
"./utils": 9
|
||||
}],
|
||||
4: [function(n, o, a) {
|
||||
Object.defineProperty(a, "__esModule", {
|
||||
value: !0
|
||||
});
|
||||
var r = function(e, t) {
|
||||
return new RegExp(" " + t + " ").test(" " + e.className + " ")
|
||||
},
|
||||
s = function(e, t) {
|
||||
r(e, t) || (e.className += " " + t)
|
||||
},
|
||||
l = function(e, t) {
|
||||
var n = " " + e.className.replace(/[\t\r\n]/g, " ") + " ";
|
||||
if (r(e, t)) {
|
||||
for (; n.indexOf(" " + t + " ") >= 0;) n = n.replace(" " + t + " ", " ");
|
||||
e.className = n.replace(/^\s+|\s+$/g, "")
|
||||
}
|
||||
},
|
||||
i = function(e) {
|
||||
var n = t.createElement("div");
|
||||
return n.appendChild(t.createTextNode(e)), n.innerHTML
|
||||
},
|
||||
u = function(e) {
|
||||
e.style.opacity = "", e.style.display = "block"
|
||||
},
|
||||
c = function(e) {
|
||||
if (e && !e.length) return u(e);
|
||||
for (var t = 0; t < e.length; ++t) u(e[t])
|
||||
},
|
||||
d = function(e) {
|
||||
e.style.opacity = "", e.style.display = "none"
|
||||
},
|
||||
f = function(e) {
|
||||
if (e && !e.length) return d(e);
|
||||
for (var t = 0; t < e.length; ++t) d(e[t])
|
||||
},
|
||||
p = function(e, t) {
|
||||
for (var n = t.parentNode; null !== n;) {
|
||||
if (n === e) return !0;
|
||||
n = n.parentNode
|
||||
}
|
||||
return !1
|
||||
},
|
||||
m = function(e) {
|
||||
e.style.left = "-9999px", e.style.display = "block";
|
||||
var t, n = e.clientHeight;
|
||||
return t = "undefined" != typeof getComputedStyle ? parseInt(getComputedStyle(e).getPropertyValue("padding-top"), 10) : parseInt(e.currentStyle.padding), e.style.left = "", e.style.display = "none", "-" + parseInt((n + t) / 2) + "px"
|
||||
},
|
||||
v = function(e, t) {
|
||||
if (+e.style.opacity < 1) {
|
||||
t = t || 16, e.style.opacity = 0, e.style.display = "block";
|
||||
var n = +new Date,
|
||||
o = function(e) {
|
||||
function t() {
|
||||
return e.apply(this, arguments)
|
||||
}
|
||||
return t.toString = function() {
|
||||
return e.toString()
|
||||
}, t
|
||||
}(function() {
|
||||
e.style.opacity = +e.style.opacity + (new Date - n) / 100, n = +new Date, +e.style.opacity < 1 && setTimeout(o, t)
|
||||
});
|
||||
o()
|
||||
}
|
||||
e.style.display = "block"
|
||||
},
|
||||
y = function(e, t) {
|
||||
t = t || 16, e.style.opacity = 1;
|
||||
var n = +new Date,
|
||||
o = function(e) {
|
||||
function t() {
|
||||
return e.apply(this, arguments)
|
||||
}
|
||||
return t.toString = function() {
|
||||
return e.toString()
|
||||
}, t
|
||||
}(function() {
|
||||
e.style.opacity = +e.style.opacity - (new Date - n) / 100, n = +new Date, +e.style.opacity > 0 ? setTimeout(o, t) : e.style.display = "none"
|
||||
});
|
||||
o()
|
||||
},
|
||||
h = function(n) {
|
||||
if ("function" == typeof MouseEvent) {
|
||||
var o = new MouseEvent("click", {
|
||||
view: e,
|
||||
bubbles: !1,
|
||||
cancelable: !0
|
||||
});
|
||||
n.dispatchEvent(o)
|
||||
} else if (t.createEvent) {
|
||||
var a = t.createEvent("MouseEvents");
|
||||
a.initEvent("click", !1, !1), n.dispatchEvent(a)
|
||||
} else t.createEventObject ? n.fireEvent("onclick") : "function" == typeof n.onclick && n.onclick()
|
||||
},
|
||||
b = function(t) {
|
||||
"function" == typeof t.stopPropagation ? (t.stopPropagation(), t.preventDefault()) : e.event && e.event.hasOwnProperty("cancelBubble") && (e.event.cancelBubble = !0)
|
||||
};
|
||||
a.hasClass = r, a.addClass = s, a.removeClass = l, a.escapeHtml = i, a._show = u, a.show = c, a._hide = d, a.hide = f, a.isDescendant = p, a.getTopMargin = m, a.fadeIn = v, a.fadeOut = y, a.fireClick = h, a.stopEventPropagation = b
|
||||
}, {}],
|
||||
5: [function(t, o, a) {
|
||||
Object.defineProperty(a, "__esModule", {
|
||||
value: !0
|
||||
});
|
||||
var r = t("./handle-dom"),
|
||||
s = t("./handle-swal-dom"),
|
||||
l = function(t, o, a) {
|
||||
var l = t || e.event,
|
||||
i = l.keyCode || l.which,
|
||||
u = a.querySelector("button.confirm"),
|
||||
c = a.querySelector("button.cancel"),
|
||||
d = a.querySelectorAll("button[tabindex]");
|
||||
if (-1 !== [9, 13, 32, 27].indexOf(i)) {
|
||||
for (var f = l.target || l.srcElement, p = -1, m = 0; m < d.length; m++)
|
||||
if (f === d[m]) {
|
||||
p = m;
|
||||
break
|
||||
}
|
||||
9 === i ? (f = -1 === p ? u : p === d.length - 1 ? d[0] : d[p + 1], r.stopEventPropagation(l), f.focus(), o.confirmButtonColor && s.setFocusStyle(f, o.confirmButtonColor)) : 13 === i ? ("INPUT" === f.tagName && (f = u, u.focus()), f = -1 === p ? u : n) : 27 === i && o.allowEscapeKey === !0 ? (f = c, r.fireClick(f, l)) : f = n
|
||||
}
|
||||
};
|
||||
a["default"] = l, o.exports = a["default"]
|
||||
}, {
|
||||
"./handle-dom": 4,
|
||||
"./handle-swal-dom": 6
|
||||
}],
|
||||
6: [function(n, o, a) {
|
||||
var r = function(e) {
|
||||
return e && e.__esModule ? e : {
|
||||
"default": e
|
||||
}
|
||||
};
|
||||
Object.defineProperty(a, "__esModule", {
|
||||
value: !0
|
||||
});
|
||||
var s = n("./utils"),
|
||||
l = n("./handle-dom"),
|
||||
i = n("./default-params"),
|
||||
u = r(i),
|
||||
c = n("./injected-html"),
|
||||
d = r(c),
|
||||
f = ".sweet-alert",
|
||||
p = ".sweet-overlay",
|
||||
m = function() {
|
||||
var e = t.createElement("div");
|
||||
for (e.innerHTML = d["default"]; e.firstChild;) t.body.appendChild(e.firstChild)
|
||||
},
|
||||
v = function(e) {
|
||||
function t() {
|
||||
return e.apply(this, arguments)
|
||||
}
|
||||
return t.toString = function() {
|
||||
return e.toString()
|
||||
}, t
|
||||
}(function() {
|
||||
var e = t.querySelector(f);
|
||||
return e || (m(), e = v()), e
|
||||
}),
|
||||
y = function() {
|
||||
var e = v();
|
||||
return e ? e.querySelector("input") : void 0
|
||||
},
|
||||
h = function() {
|
||||
return t.querySelector(p)
|
||||
},
|
||||
b = function(e, t) {
|
||||
var n = s.hexToRgb(t);
|
||||
e.style.boxShadow = "0 0 2px rgba(" + n + ", 0.8), inset 0 0 0 1px rgba(0, 0, 0, 0.05)"
|
||||
},
|
||||
g = function(n) {
|
||||
var o = v();
|
||||
l.fadeIn(h(), 10), l.show(o), l.addClass(o, "showSweetAlert"), l.removeClass(o, "hideSweetAlert"), e.previousActiveElement = t.activeElement;
|
||||
var a = o.querySelector("button.confirm");
|
||||
a.focus(), setTimeout(function() {
|
||||
l.addClass(o, "visible")
|
||||
}, 500);
|
||||
var r = o.getAttribute("data-timer");
|
||||
if ("null" !== r && "" !== r) {
|
||||
var s = n;
|
||||
o.timeout = setTimeout(function() {
|
||||
var e = (s || null) && "true" === o.getAttribute("data-has-done-function");
|
||||
e ? s(null) : sweetAlert.close()
|
||||
}, r)
|
||||
}
|
||||
},
|
||||
w = function() {
|
||||
var e = v(),
|
||||
t = y();
|
||||
l.removeClass(e, "show-input"), t.value = u["default"].inputValue, t.setAttribute("type", u["default"].inputType), t.setAttribute("placeholder", u["default"].inputPlaceholder), C()
|
||||
},
|
||||
C = function(e) {
|
||||
if (e && 13 === e.keyCode) return !1;
|
||||
var t = v(),
|
||||
n = t.querySelector(".sa-input-error");
|
||||
l.removeClass(n, "show");
|
||||
var o = t.querySelector(".sa-error-container");
|
||||
l.removeClass(o, "show")
|
||||
},
|
||||
S = function() {
|
||||
var e = v();
|
||||
e.style.marginTop = l.getTopMargin(v())
|
||||
};
|
||||
a.sweetAlertInitialize = m, a.getModal = v, a.getOverlay = h, a.getInput = y, a.setFocusStyle = b, a.openModal = g, a.resetInput = w, a.resetInputError = C, a.fixVerticalPosition = S
|
||||
}, {
|
||||
"./default-params": 2,
|
||||
"./handle-dom": 4,
|
||||
"./injected-html": 7,
|
||||
"./utils": 9
|
||||
}],
|
||||
7: [function(e, t, n) {
|
||||
Object.defineProperty(n, "__esModule", {
|
||||
value: !0
|
||||
});
|
||||
var o = '<div class="sweet-overlay" tabIndex="-1"></div><div class="sweet-alert"><div class="sa-icon sa-error">\n <span class="sa-x-mark">\n <span class="sa-line sa-left"></span>\n <span class="sa-line sa-right"></span>\n </span>\n </div><div class="sa-icon sa-warning">\n <span class="sa-body"></span>\n <span class="sa-dot"></span>\n </div><div class="sa-icon sa-info"></div><div class="sa-icon sa-success">\n <span class="sa-line sa-tip"></span>\n <span class="sa-line sa-long"></span>\n\n <div class="sa-placeholder"></div>\n <div class="sa-fix"></div>\n </div><div class="sa-icon sa-custom"></div><h2>Title</h2>\n <p>Text</p>\n <fieldset>\n <input type="text" tabIndex="3" />\n <div class="sa-input-error"></div>\n </fieldset><div class="sa-error-container">\n <div class="icon">!</div>\n <p>Not valid!</p>\n </div><div class="sa-button-container">\n <button class="cancel" tabIndex="2">Cancel</button>\n <div class="sa-confirm-button-container">\n <button class="confirm" tabIndex="1">OK</button><div class="la-ball-fall">\n <div></div>\n <div></div>\n <div></div>\n </div>\n </div>\n </div></div>';
|
||||
n["default"] = o, t.exports = n["default"]
|
||||
}, {}],
|
||||
8: [function(e, t, o) {
|
||||
Object.defineProperty(o, "__esModule", {
|
||||
value: !0
|
||||
});
|
||||
var a = e("./utils"),
|
||||
r = e("./handle-swal-dom"),
|
||||
s = e("./handle-dom"),
|
||||
l = ["error", "warning", "info", "success", "input", "prompt"],
|
||||
i = function(e) {
|
||||
var t = r.getModal(),
|
||||
o = t.querySelector("h2"),
|
||||
i = t.querySelector("p"),
|
||||
u = t.querySelector("button.cancel"),
|
||||
c = t.querySelector("button.confirm");
|
||||
if (o.innerHTML = e.html ? e.title : s.escapeHtml(e.title).split("\n").join("<br>"), i.innerHTML = e.html ? e.text : s.escapeHtml(e.text || "").split("\n").join("<br>"), e.text && s.show(i), e.customClass) s.addClass(t, e.customClass), t.setAttribute("data-custom-class", e.customClass);
|
||||
else {
|
||||
var d = t.getAttribute("data-custom-class");
|
||||
s.removeClass(t, d), t.setAttribute("data-custom-class", "")
|
||||
}
|
||||
if (s.hide(t.querySelectorAll(".sa-icon")), e.type && !a.isIE8()) {
|
||||
var f = function() {
|
||||
for (var o = !1, a = 0; a < l.length; a++)
|
||||
if (e.type === l[a]) {
|
||||
o = !0;
|
||||
break
|
||||
}
|
||||
if (!o) return logStr("Unknown alert type: " + e.type), {
|
||||
v: !1
|
||||
};
|
||||
var i = ["success", "error", "warning", "info"],
|
||||
u = n; - 1 !== i.indexOf(e.type) && (u = t.querySelector(".sa-icon.sa-" + e.type), s.show(u));
|
||||
var c = r.getInput();
|
||||
switch (e.type) {
|
||||
case "success":
|
||||
s.addClass(u, "animate"), s.addClass(u.querySelector(".sa-tip"), "animateSuccessTip"), s.addClass(u.querySelector(".sa-long"), "animateSuccessLong");
|
||||
break;
|
||||
case "error":
|
||||
s.addClass(u, "animateErrorIcon"), s.addClass(u.querySelector(".sa-x-mark"), "animateXMark");
|
||||
break;
|
||||
case "warning":
|
||||
s.addClass(u, "pulseWarning"), s.addClass(u.querySelector(".sa-body"), "pulseWarningIns"), s.addClass(u.querySelector(".sa-dot"), "pulseWarningIns");
|
||||
break;
|
||||
case "input":
|
||||
case "prompt":
|
||||
c.setAttribute("type", e.inputType), c.value = e.inputValue, c.setAttribute("placeholder", e.inputPlaceholder), s.addClass(t, "show-input"), setTimeout(function() {
|
||||
c.focus(), c.addEventListener("keyup", swal.resetInputError)
|
||||
}, 400)
|
||||
}
|
||||
}();
|
||||
if ("object" == typeof f) return f.v
|
||||
}
|
||||
if (e.imageUrl) {
|
||||
var p = t.querySelector(".sa-icon.sa-custom");
|
||||
p.style.backgroundImage = "url(" + e.imageUrl + ")", s.show(p);
|
||||
var m = 80,
|
||||
v = 80;
|
||||
if (e.imageSize) {
|
||||
var y = e.imageSize.toString().split("x"),
|
||||
h = y[0],
|
||||
b = y[1];
|
||||
h && b ? (m = h, v = b) : logStr("Parameter imageSize expects value with format WIDTHxHEIGHT, got " + e.imageSize)
|
||||
}
|
||||
p.setAttribute("style", p.getAttribute("style") + "width:" + m + "px; height:" + v + "px")
|
||||
}
|
||||
t.setAttribute("data-has-cancel-button", e.showCancelButton), e.showCancelButton ? u.style.display = "inline-block" : s.hide(u), t.setAttribute("data-has-confirm-button", e.showConfirmButton), e.showConfirmButton ? c.style.display = "inline-block" : s.hide(c), e.cancelButtonText && (u.innerHTML = s.escapeHtml(e.cancelButtonText)), e.confirmButtonText && (c.innerHTML = s.escapeHtml(e.confirmButtonText)), e.confirmButtonColor && (c.style.backgroundColor = e.confirmButtonColor, c.style.borderLeftColor = e.confirmLoadingButtonColor, c.style.borderRightColor = e.confirmLoadingButtonColor, r.setFocusStyle(c, e.confirmButtonColor)), t.setAttribute("data-allow-outside-click", e.allowOutsideClick);
|
||||
var g = e.doneFunction ? !0 : !1;
|
||||
t.setAttribute("data-has-done-function", g), e.animation ? "string" == typeof e.animation ? t.setAttribute("data-animation", e.animation) : t.setAttribute("data-animation", "pop") : t.setAttribute("data-animation", "none"), t.setAttribute("data-timer", e.timer)
|
||||
};
|
||||
o["default"] = i, t.exports = o["default"]
|
||||
}, {
|
||||
"./handle-dom": 4,
|
||||
"./handle-swal-dom": 6,
|
||||
"./utils": 9
|
||||
}],
|
||||
9: [function(t, n, o) {
|
||||
Object.defineProperty(o, "__esModule", {
|
||||
value: !0
|
||||
});
|
||||
var a = function(e, t) {
|
||||
for (var n in t) t.hasOwnProperty(n) && (e[n] = t[n]);
|
||||
return e
|
||||
},
|
||||
r = function(e) {
|
||||
var t = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);
|
||||
return t ? parseInt(t[1], 16) + ", " + parseInt(t[2], 16) + ", " + parseInt(t[3], 16) : null
|
||||
},
|
||||
s = function() {
|
||||
return e.attachEvent && !e.addEventListener
|
||||
},
|
||||
l = function(t) {
|
||||
e.console && e.console.log("SweetAlert: " + t)
|
||||
},
|
||||
i = function(e, t) {
|
||||
e = String(e).replace(/[^0-9a-f]/gi, ""), e.length < 6 && (e = e[0] + e[0] + e[1] + e[1] + e[2] + e[2]), t = t || 0;
|
||||
var n, o, a = "#";
|
||||
for (o = 0; 3 > o; o++) n = parseInt(e.substr(2 * o, 2), 16), n = Math.round(Math.min(Math.max(0, n + n * t), 255)).toString(16), a += ("00" + n).substr(n.length);
|
||||
return a
|
||||
};
|
||||
o.extend = a, o.hexToRgb = r, o.isIE8 = s, o.logStr = l, o.colorLuminance = i
|
||||
}, {}]
|
||||
}, {}, [1]), "function" == typeof define && define.amd ? define(function() {
|
||||
return sweetAlert
|
||||
}) : "undefined" != typeof module && module.exports && (module.exports = sweetAlert)
|
||||
}(window, document);
|
||||
!function(e,t,n){"use strict";!function o(e,t,n){function a(s,l){if(!t[s]){if(!e[s]){var i="function"==typeof require&&require;if(!l&&i)return i(s,!0);if(r)return r(s,!0);var u=new Error("Cannot find module '"+s+"'");throw u.code="MODULE_NOT_FOUND",u}var c=t[s]={exports:{}};e[s][0].call(c.exports,function(t){var n=e[s][1][t];return a(n?n:t)},c,c.exports,o,e,t,n)}return t[s].exports}for(var r="function"==typeof require&&require,s=0;s<n.length;s++)a(n[s]);return a}({1:[function(o,a,r){var s=function(e){return e&&e.__esModule?e:{"default":e}};Object.defineProperty(r,"__esModule",{value:!0});var l,i,u,c,d=o("./modules/handle-dom"),f=o("./modules/utils"),p=o("./modules/handle-swal-dom"),m=o("./modules/handle-click"),v=o("./modules/handle-key"),y=s(v),h=o("./modules/default-params"),b=s(h),g=o("./modules/set-params"),w=s(g);r["default"]=u=c=function(){function o(e){var t=a;return t[e]===n?b["default"][e]:t[e]}var a=arguments[0];if(d.addClass(t.body,"stop-scrolling"),p.resetInput(),a===n)return f.logStr("SweetAlert expects at least 1 attribute!"),!1;var r=f.extend({},b["default"]);switch(typeof a){case"string":r.title=a,r.text=arguments[1]||"",r.type=arguments[2]||"";break;case"object":if(a.title===n)return f.logStr('Missing "title" argument!'),!1;r.title=a.title;for(var s in b["default"])r[s]=o(s);r.confirmButtonText=r.showCancelButton?"Confirm":b["default"].confirmButtonText,r.confirmButtonText=o("confirmButtonText"),r.doneFunction=arguments[1]||null;break;default:return f.logStr('Unexpected type of argument! Expected "string" or "object", got '+typeof a),!1}w["default"](r),p.fixVerticalPosition(),p.openModal(arguments[1]);for(var u=p.getModal(),v=u.querySelectorAll("button"),h=["onclick","onmouseover","onmouseout","onmousedown","onmouseup","onfocus"],g=function(e){return m.handleButton(e,r,u)},C=0;C<v.length;C++)for(var S=0;S<h.length;S++){var x=h[S];v[C][x]=g}p.getOverlay().onclick=g,l=e.onkeydown;var k=function(e){return y["default"](e,r,u)};e.onkeydown=k,e.onfocus=function(){setTimeout(function(){i!==n&&(i.focus(),i=n)},0)},c.enableButtons()},u.setDefaults=c.setDefaults=function(e){if(!e)throw new Error("userParams is required");if("object"!=typeof e)throw new Error("userParams has to be a object");f.extend(b["default"],e)},u.close=c.close=function(){var o=p.getModal();d.fadeOut(p.getOverlay(),5),d.fadeOut(o,5),d.removeClass(o,"showSweetAlert"),d.addClass(o,"hideSweetAlert"),d.removeClass(o,"visible");var a=o.querySelector(".sa-icon.sa-success");d.removeClass(a,"animate"),d.removeClass(a.querySelector(".sa-tip"),"animateSuccessTip"),d.removeClass(a.querySelector(".sa-long"),"animateSuccessLong");var r=o.querySelector(".sa-icon.sa-error");d.removeClass(r,"animateErrorIcon"),d.removeClass(r.querySelector(".sa-x-mark"),"animateXMark");var s=o.querySelector(".sa-icon.sa-warning");return d.removeClass(s,"pulseWarning"),d.removeClass(s.querySelector(".sa-body"),"pulseWarningIns"),d.removeClass(s.querySelector(".sa-dot"),"pulseWarningIns"),setTimeout(function(){var e=o.getAttribute("data-custom-class");d.removeClass(o,e)},300),d.removeClass(t.body,"stop-scrolling"),e.onkeydown=l,e.previousActiveElement&&e.previousActiveElement.focus(),i=n,clearTimeout(o.timeout),!0},u.showInputError=c.showInputError=function(e){var t=p.getModal(),n=t.querySelector(".sa-input-error");d.addClass(n,"show");var o=t.querySelector(".sa-error-container");d.addClass(o,"show"),o.querySelector("p").innerHTML=e,setTimeout(function(){u.enableButtons()},1),t.querySelector("input").focus()},u.resetInputError=c.resetInputError=function(e){if(e&&13===e.keyCode)return!1;var t=p.getModal(),n=t.querySelector(".sa-input-error");d.removeClass(n,"show");var o=t.querySelector(".sa-error-container");d.removeClass(o,"show")},u.disableButtons=c.disableButtons=function(){var e=p.getModal(),t=e.querySelector("button.confirm"),n=e.querySelector("button.cancel");t.disabled=!0,n.disabled=!0},u.enableButtons=c.enableButtons=function(){var e=p.getModal(),t=e.querySelector("button.confirm"),n=e.querySelector("button.cancel");t.disabled=!1,n.disabled=!1},"undefined"!=typeof e?e.sweetAlert=e.swal=u:f.logStr("SweetAlert is a frontend module!"),a.exports=r["default"]},{"./modules/default-params":2,"./modules/handle-click":3,"./modules/handle-dom":4,"./modules/handle-key":5,"./modules/handle-swal-dom":6,"./modules/set-params":8,"./modules/utils":9}],2:[function(e,t,n){Object.defineProperty(n,"__esModule",{value:!0});var o={title:"",text:"",type:null,allowOutsideClick:!1,showConfirmButton:!0,showCancelButton:!1,closeOnConfirm:!0,closeOnCancel:!0,confirmButtonText:"OK",confirmButtonColor:"#8CD4F5",cancelButtonText:"Cancel",imageUrl:null,imageSize:null,timer:null,customClass:"",html:!1,animation:!0,allowEscapeKey:!0,inputType:"text",inputPlaceholder:"",inputValue:"",showLoaderOnConfirm:!1};n["default"]=o,t.exports=n["default"]},{}],3:[function(t,n,o){Object.defineProperty(o,"__esModule",{value:!0});var a=t("./utils"),r=(t("./handle-swal-dom"),t("./handle-dom")),s=functionLine truncated
|
||||
Reference in new issue
Block a user