added few .html files

This commit is contained in:
kicap1992
2021-12-22 04:28:54 +08:00
parent a25104fadc
commit f64e1260a7
22 changed files with 13787 additions and 2619 deletions

204
admin/assets/dist/css/lightbox.css vendored Normal file
View File

@ -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;
}

View File

@ -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}

BIN
admin/assets/dist/images/close.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 280 B

BIN
admin/assets/dist/images/loading.gif vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

BIN
admin/assets/dist/images/next.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
admin/assets/dist/images/prev.png vendored Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

559
admin/assets/dist/js/lightbox.js vendored Normal file
View File

@ -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();
}));

15
admin/assets/dist/js/lightbox.min.js vendored Normal file

File diff suppressed because one or more lines are too long

1
admin/assets/dist/js/lightbox.min.map vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -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.');
});

View File

@ -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>
&nbsp;
<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>
&nbsp;
<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>
&nbsp;
<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">&times;</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>

464
admin/list_produk.html Normal file
View File

@ -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>
&nbsp;
<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>
&nbsp;
<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>
&nbsp;
<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">&times;</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">&times;</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>

View File

@ -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 one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long