Commit inicial Ventas Productivo

This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2019-08-14 16:40:54 -07:00
commit c35cf91883
13328 changed files with 3711549 additions and 0 deletions

View File

@@ -0,0 +1,179 @@
/**
Demo script to handle the theme demo
**/
var Demo = function () {
// Handle Theme Settings
var handleTheme = function () {
var panel = $('.theme-panel');
if ($('.page-head > .container-fluid').size() === 1) {
$('.theme-setting-layout', panel).val("fluid");
} else {
$('.theme-setting-layout', panel).val("boxed");
}
if ($('.top-menu li.dropdown.dropdown-dark').size() > 0) {
$('.theme-setting-top-menu-style', panel).val("dark");
} else {
$('.theme-setting-top-menu-style', panel).val("light");
}
if ($('body').hasClass("page-header-top-fixed")) {
$('.theme-setting-top-menu-mode', panel).val("fixed");
} else {
$('.theme-setting-top-menu-mode', panel).val("not-fixed");
}
if ($('.hor-menu.hor-menu-light').size() > 0) {
$('.theme-setting-mega-menu-style', panel).val("light");
} else {
$('.theme-setting-mega-menu-style', panel).val("dark");
}
if ($('body').hasClass("page-header-menu-fixed")) {
$('.theme-setting-mega-menu-mode', panel).val("fixed");
} else {
$('.theme-setting-mega-menu-mode', panel).val("not-fixed");
}
//handle theme layout
var resetLayout = function () {
$("body").
removeClass("page-header-top-fixed").
removeClass("page-header-menu-fixed");
$('.page-header-top > .container-fluid').removeClass("container-fluid").addClass('container');
$('.page-header-menu > .container-fluid').removeClass("container-fluid").addClass('container');
$('.page-head > .container-fluid').removeClass("container-fluid").addClass('container');
$('.page-content > .container-fluid').removeClass("container-fluid").addClass('container');
$('.page-prefooter > .container-fluid').removeClass("container-fluid").addClass('container');
$('.page-footer > .container-fluid').removeClass("container-fluid").addClass('container');
};
var setLayout = function () {
var layoutMode = $('.theme-setting-layout', panel).val();
var headerTopMenuStyle = $('.theme-setting-top-menu-style', panel).val();
var headerTopMenuMode = $('.theme-setting-top-menu-mode', panel).val();
var headerMegaMenuStyle = $('.theme-setting-mega-menu-style', panel).val();
var headerMegaMenuMode = $('.theme-setting-mega-menu-mode', panel).val();
resetLayout(); // reset layout to default state
if (layoutMode === "fluid") {
$('.page-header-top > .container').removeClass("container").addClass('container-fluid');
$('.page-header-menu > .container').removeClass("container").addClass('container-fluid');
$('.page-head > .container').removeClass("container").addClass('container-fluid');
$('.page-content > .container').removeClass("container").addClass('container-fluid');
$('.page-prefooter > .container').removeClass("container").addClass('container-fluid');
$('.page-footer > .container').removeClass("container").addClass('container-fluid');
//App.runResizeHandlers();
}
if (headerTopMenuStyle === 'dark') {
$(".top-menu > .navbar-nav > li.dropdown").addClass("dropdown-dark");
} else {
$(".top-menu > .navbar-nav > li.dropdown").removeClass("dropdown-dark");
}
if (headerTopMenuMode === 'fixed') {
$("body").addClass("page-header-top-fixed");
} else {
$("body").removeClass("page-header-top-fixed");
}
if (headerMegaMenuStyle === 'light') {
$(".hor-menu").addClass("hor-menu-light");
} else {
$(".hor-menu").removeClass("hor-menu-light");
}
if (headerMegaMenuMode === 'fixed') {
$("body").addClass("page-header-menu-fixed");
} else {
$("body").removeClass("page-header-menu-fixed");
}
};
// handle theme colors
var setColor = function (color) {
var color_ = (App.isRTL() ? color + '-rtl' : color);
$('#style_color').attr("href", Layout.getLayoutCssPath() + 'themes/' + color_ + ".min.css");
$('.page-logo img').attr("src", Layout.getLayoutImgPath() + 'logo-' + color + '.png');
};
$('.theme-colors > li', panel).click(function () {
var color = $(this).attr("data-theme");
setColor(color);
$('.theme-colors > li', panel).removeClass("active");
$(this).addClass("active");
});
$('.theme-setting-top-menu-mode', panel).change(function(){
var headerTopMenuMode = $('.theme-setting-top-menu-mode', panel).val();
var headerMegaMenuMode = $('.theme-setting-mega-menu-mode', panel).val();
if (headerMegaMenuMode === "fixed") {
alert("The top menu and mega menu can not be fixed at the same time.");
$('.theme-setting-mega-menu-mode', panel).val("not-fixed");
headerTopMenuMode = 'not-fixed';
}
});
$('.theme-setting-mega-menu-mode', panel).change(function(){
var headerTopMenuMode = $('.theme-setting-top-menu-mode', panel).val();
var headerMegaMenuMode = $('.theme-setting-mega-menu-mode', panel).val();
if (headerTopMenuMode === "fixed") {
alert("The top menu and mega menu can not be fixed at the same time.");
$('.theme-setting-top-menu-mode', panel).val("not-fixed");
headerTopMenuMode = 'not-fixed';
}
});
$('.theme-setting', panel).change(setLayout);
};
// handle theme style
var setThemeStyle = function(style) {
var file = (style === 'rounded' ? 'components-rounded' : 'components');
file = (App.isRTL() ? file + '-rtl' : file);
$('#style_components').attr("href", App.getGlobalCssPath() + file + ".min.css");
if (typeof Cookies !== "undefined") {
Cookies.set('layout-style-option', style);
}
};
return {
//main function to initiate the theme
init: function() {
// handles style customer tool
handleTheme();
// handle layout style change
$('.theme-panel .theme-setting-style').change(function() {
setThemeStyle($(this).val());
});
// set layout style from cookie
if (typeof Cookies !== "undefined" && Cookies.get('layout-style-option') === 'rounded') {
setThemeStyle(Cookies.get('layout-style-option'));
$('.theme-panel .layout-style-option').val(Cookies.get('layout-style-option'));
}
}
};
}();
if (App.isAngularJsApp() === false) {
jQuery(document).ready(function() {
Demo.init();
});
}

View File

@@ -0,0 +1 @@
var Demo=function(){var e=function(){var e=$(".theme-panel");1===$(".page-head > .container-fluid").size()?$(".theme-setting-layout",e).val("fluid"):$(".theme-setting-layout",e).val("boxed"),$(".top-menu li.dropdown.dropdown-dark").size()>0?$(".theme-setting-top-menu-style",e).val("dark"):$(".theme-setting-top-menu-style",e).val("light"),$("body").hasClass("page-header-top-fixed")?$(".theme-setting-top-menu-mode",e).val("fixed"):$(".theme-setting-top-menu-mode",e).val("not-fixed"),$(".hor-menu.hor-menu-light").size()>0?$(".theme-setting-mega-menu-style",e).val("light"):$(".theme-setting-mega-menu-style",e).val("dark"),$("body").hasClass("page-header-menu-fixed")?$(".theme-setting-mega-menu-mode",e).val("fixed"):$(".theme-setting-mega-menu-mode",e).val("not-fixed");var t=function(){$("body").removeClass("page-header-top-fixed").removeClass("page-header-menu-fixed"),$(".page-header-top > .container-fluid").removeClass("container-fluid").addClass("container"),$(".page-header-menu > .container-fluid").removeClass("container-fluid").addClass("container"),$(".page-head > .container-fluid").removeClass("container-fluid").addClass("container"),$(".page-content > .container-fluid").removeClass("container-fluid").addClass("container"),$(".page-prefooter > .container-fluid").removeClass("container-fluid").addClass("container"),$(".page-footer > .container-fluid").removeClass("container-fluid").addClass("container")},a=function(){var a=$(".theme-setting-layout",e).val(),n=$(".theme-setting-top-menu-style",e).val(),o=$(".theme-setting-top-menu-mode",e).val(),i=$(".theme-setting-mega-menu-style",e).val(),s=$(".theme-setting-mega-menu-mode",e).val();t(),"fluid"===a&&($(".page-header-top > .container").removeClass("container").addClass("container-fluid"),$(".page-header-menu > .container").removeClass("container").addClass("container-fluid"),$(".page-head > .container").removeClass("container").addClass("container-fluid"),$(".page-content > .container").removeClass("container").addClass("container-fluid"),$(".page-prefooter > .container").removeClass("container").addClass("container-fluid"),$(".page-footer > .container").removeClass("container").addClass("container-fluid")),"dark"===n?$(".top-menu > .navbar-nav > li.dropdown").addClass("dropdown-dark"):$(".top-menu > .navbar-nav > li.dropdown").removeClass("dropdown-dark"),"fixed"===o?$("body").addClass("page-header-top-fixed"):$("body").removeClass("page-header-top-fixed"),"light"===i?$(".hor-menu").addClass("hor-menu-light"):$(".hor-menu").removeClass("hor-menu-light"),"fixed"===s?$("body").addClass("page-header-menu-fixed"):$("body").removeClass("page-header-menu-fixed")},n=function(e){var t=App.isRTL()?e+"-rtl":e;$("#style_color").attr("href",Layout.getLayoutCssPath()+"themes/"+t+".min.css"),$(".page-logo img").attr("src",Layout.getLayoutImgPath()+"logo-"+e+".png")};$(".theme-colors > li",e).click(function(){var t=$(this).attr("data-theme");n(t),$(".theme-colors > li",e).removeClass("active"),$(this).addClass("active")}),$(".theme-setting-top-menu-mode",e).change(function(){var t=$(".theme-setting-top-menu-mode",e).val(),a=$(".theme-setting-mega-menu-mode",e).val();"fixed"===a&&(alert("The top menu and mega menu can not be fixed at the same time."),$(".theme-setting-mega-menu-mode",e).val("not-fixed"),t="not-fixed")}),$(".theme-setting-mega-menu-mode",e).change(function(){var t=$(".theme-setting-top-menu-mode",e).val();$(".theme-setting-mega-menu-mode",e).val();"fixed"===t&&(alert("The top menu and mega menu can not be fixed at the same time."),$(".theme-setting-top-menu-mode",e).val("not-fixed"),t="not-fixed")}),$(".theme-setting",e).change(a)},t=function(e){var t="rounded"===e?"components-rounded":"components";t=App.isRTL()?t+"-rtl":t,$("#style_components").attr("href",App.getGlobalCssPath()+t+".min.css"),"undefined"!=typeof Cookies&&Cookies.set("layout-style-option",e)};return{init:function(){e(),$(".theme-panel .theme-setting-style").change(function(){t($(this).val())}),"undefined"!=typeof Cookies&&"rounded"===Cookies.get("layout-style-option")&&(t(Cookies.get("layout-style-option")),$(".theme-panel .layout-style-option").val(Cookies.get("layout-style-option")))}}}();App.isAngularJsApp()===!1&&jQuery(document).ready(function(){Demo.init()});

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

View File

@@ -0,0 +1,296 @@
/**
Core script to handle the entire theme and core functions
**/
var Layout = function () {
var layoutImgPath = 'layouts/layout3/img/';
var layoutCssPath = 'layouts/layout3/css/';
var resBreakpointMd = App.getResponsiveBreakpoint('md');
//* BEGIN:CORE HANDLERS *//
// this function handles responsive layout on screen size resize or mobile device rotate.
// Handles header
var handleHeader = function () {
// handle search box expand/collapse
$('.page-header').on('click', '.search-form', function (e) {
$(this).addClass("open");
$(this).find('.form-control').focus();
$('.page-header .search-form .form-control').on('blur', function (e) {
$(this).closest('.search-form').removeClass("open");
$(this).unbind("blur");
});
});
// handle hor menu search form on enter press
$('.page-header').on('keypress', '.hor-menu .search-form .form-control', function (e) {
if (e.which == 13) {
$(this).closest('.search-form').submit();
return false;
}
});
// handle header search button click
$('.page-header').on('mousedown', '.search-form.open .submit', function (e) {
e.preventDefault();
e.stopPropagation();
$(this).closest('.search-form').submit();
});
// handle scrolling to top on responsive menu toggler click when header is fixed for mobile view
$('body').on('click', '.page-header-top-fixed .page-header-top .menu-toggler', function(){
App.scrollTop();
});
};
// Handles main menu
var handleMainMenu = function () {
// handle menu toggler icon click
$(".page-header .menu-toggler").on("click", function(event) {
if (App.getViewPort().width < resBreakpointMd) {
var menu = $(".page-header .page-header-menu");
if (menu.is(":visible")) {
menu.slideUp(300);
} else {
menu.slideDown(300);
}
if ($('body').hasClass('page-header-top-fixed')) {
App.scrollTop();
}
}
});
// handle sub dropdown menu click for mobile devices only
$(".hor-menu .menu-dropdown > a, .hor-menu .dropdown-submenu > a").on("click", function(e) {
if (App.getViewPort().width < resBreakpointMd) {
if ($(this).next().hasClass('dropdown-menu')) {
e.stopPropagation();
if ($(this).parent().hasClass("opened")) {
$(this).parent().removeClass("opened");
} else {
$(this).parent().addClass("opened");
}
}
}
});
// close main menu on final link click for mobile mode
$(".hor-menu li > a").on("click", function(e) {
if (App.getViewPort().width < resBreakpointMd) {
if (!$(this).parent('li').hasClass('classic-menu-dropdown') && !$(this).parent('li').hasClass('mega-menu-dropdown')
&& !$(this).parent('li').hasClass('dropdown-submenu')) {
$(".page-header .page-header-menu").slideUp(300);
App.scrollTop();
}
}
});
// hold mega menu content open on click/tap.
$(document).on('click', '.mega-menu-dropdown .dropdown-menu, .classic-menu-dropdown .dropdown-menu', function (e) {
e.stopPropagation();
});
// handle fixed mega menu(minimized)
$(window).scroll(function() {
var offset = 75;
if ($('body').hasClass('page-header-menu-fixed')) {
if ($(window).scrollTop() > offset){
$(".page-header-menu").addClass("fixed");
} else {
$(".page-header-menu").removeClass("fixed");
}
}
if ($('body').hasClass('page-header-top-fixed')) {
if ($(window).scrollTop() > offset){
$(".page-header-top").addClass("fixed");
} else {
$(".page-header-top").removeClass("fixed");
}
}
});
};
// Handle sidebar menu links
var handleMainMenuActiveLink = function(mode, el, $state) {
var url = encodeURI(location.hash).toLowerCase();
var menu = $('.hor-menu');
if (mode === 'click' || mode === 'set') {
el = $(el);
} else if (mode === 'match') {
menu.find("li > a").each(function() {
var state = $(this).attr('ui-sref');
if ($state && state) {
if ($state.is(state)) {
el = $(this);
return;
}
} else {
var path = $(this).attr('href');
if (path) {
// url match condition
path = path.toLowerCase();
if (path.length > 1 && url.substr(1, path.length - 1) == path.substr(1)) {
el = $(this);
return;
}
}
}
});
}
if (!el || el.size() == 0) {
return;
}
if (el.attr('href') == 'javascript:;' ||
el.attr('ui-sref') == 'javascript:;' ||
el.attr('href') == '#' ||
el.attr('ui-sref') == '#'
) {
return;
}
// disable active states
menu.find('li.active').removeClass('active');
menu.find('li > a > .selected').remove();
menu.find('li.open').removeClass('open');
el.parents('li').each(function () {
$(this).addClass('active');
if ($(this).parent('ul.navbar-nav').size() === 1) {
$(this).find('> a').append('<span class="selected"></span>');
}
});
};
// Handles main menu on window resize
var handleMainMenuOnResize = function() {
// handle hover dropdown menu for desktop devices only
var width = App.getViewPort().width;
var menu = $(".page-header-menu");
if (width >= resBreakpointMd) {
$(".page-header-menu").css("display", "block");
} else if (width < resBreakpointMd) {
$(".page-header-menu").css("display", "none");
}
};
var handleContentHeight = function() {
return;
var height;
if ($('body').height() < App.getViewPort().height) {
height = App.getViewPort().height -
$('.page-header').outerHeight() -
($('.page-container').outerHeight() - $('.page-content').outerHeight()) -
$('.page-prefooter').outerHeight() -
$('.page-footer').outerHeight();
$('.page-content').css('min-height', height);
}
};
// Handles the go to top button at the footer
var handleGoTop = function () {
var offset = 100;
var duration = 500;
if (navigator.userAgent.match(/iPhone|iPad|iPod/i)) { // ios supported
$(window).bind("touchend touchcancel touchleave", function(e){
if ($(this).scrollTop() > offset) {
$('.scroll-to-top').fadeIn(duration);
} else {
$('.scroll-to-top').fadeOut(duration);
}
});
} else { // general
$(window).scroll(function() {
if ($(this).scrollTop() > offset) {
$('.scroll-to-top').fadeIn(duration);
} else {
$('.scroll-to-top').fadeOut(duration);
}
});
}
$('.scroll-to-top').click(function(e) {
e.preventDefault();
$('html, body').animate({scrollTop: 0}, duration);
return false;
});
};
//* END:CORE HANDLERS *//
return {
// Main init methods to initialize the layout
// IMPORTANT!!!: Do not modify the core handlers call order.
initHeader: function($state) {
handleHeader(); // handles horizontal menu
handleMainMenu(); // handles menu toggle for mobile
App.addResizeHandler(handleMainMenuOnResize); // handle main menu on window resize
if (App.isAngularJsApp()) {
handleMainMenuActiveLink('match', null, $state); // init sidebar active links
}
},
initContent: function() {
handleContentHeight(); // handles content height
},
initFooter: function() {
handleGoTop(); //handles scroll to top functionality in the footer
},
init: function () {
this.initHeader();
this.initContent();
this.initFooter();
},
setMainMenuActiveLink: function(mode, el) {
handleMainMenuActiveLink(mode, el);
},
setAngularJsMainMenuActiveLink: function(mode, el, $state) {
handleMainMenuActiveLink(mode, el, $state);
},
closeMainMenu: function() {
$('.hor-menu').find('li.open').removeClass('open');
if (App.getViewPort().width < resBreakpointMd && $('.page-header-menu').is(":visible")) { // close the menu on mobile view while laoding a page
$('.page-header .menu-toggler').click();
}
},
getLayoutImgPath: function() {
return App.getAssetsPath() + layoutImgPath;
},
getLayoutCssPath: function() {
return App.getAssetsPath() + layoutCssPath;
}
};
}();
if (App.isAngularJsApp() === false) {
jQuery(document).ready(function() {
Layout.init(); // init metronic core componets
});
}

View File

@@ -0,0 +1 @@
var Layout=function(){var e="layouts/layout3/img/",n="layouts/layout3/css/",o=App.getResponsiveBreakpoint("md"),t=function(){$(".page-header").on("click",".search-form",function(e){$(this).addClass("open"),$(this).find(".form-control").focus(),$(".page-header .search-form .form-control").on("blur",function(e){$(this).closest(".search-form").removeClass("open"),$(this).unbind("blur")})}),$(".page-header").on("keypress",".hor-menu .search-form .form-control",function(e){return 13==e.which?($(this).closest(".search-form").submit(),!1):void 0}),$(".page-header").on("mousedown",".search-form.open .submit",function(e){e.preventDefault(),e.stopPropagation(),$(this).closest(".search-form").submit()}),$("body").on("click",".page-header-top-fixed .page-header-top .menu-toggler",function(){App.scrollTop()})},a=function(){$(".page-header .menu-toggler").on("click",function(e){if(App.getViewPort().width<o){var n=$(".page-header .page-header-menu");n.is(":visible")?n.slideUp(300):n.slideDown(300),$("body").hasClass("page-header-top-fixed")&&App.scrollTop()}}),$(".hor-menu .menu-dropdown > a, .hor-menu .dropdown-submenu > a").on("click",function(e){App.getViewPort().width<o&&$(this).next().hasClass("dropdown-menu")&&(e.stopPropagation(),$(this).parent().hasClass("opened")?$(this).parent().removeClass("opened"):$(this).parent().addClass("opened"))}),$(".hor-menu li > a").on("click",function(e){App.getViewPort().width<o&&($(this).parent("li").hasClass("classic-menu-dropdown")||$(this).parent("li").hasClass("mega-menu-dropdown")||$(this).parent("li").hasClass("dropdown-submenu")||($(".page-header .page-header-menu").slideUp(300),App.scrollTop()))}),$(document).on("click",".mega-menu-dropdown .dropdown-menu, .classic-menu-dropdown .dropdown-menu",function(e){e.stopPropagation()}),$(window).scroll(function(){var e=75;$("body").hasClass("page-header-menu-fixed")&&($(window).scrollTop()>e?$(".page-header-menu").addClass("fixed"):$(".page-header-menu").removeClass("fixed")),$("body").hasClass("page-header-top-fixed")&&($(window).scrollTop()>e?$(".page-header-top").addClass("fixed"):$(".page-header-top").removeClass("fixed"))})},i=function(e,n,o){var t=encodeURI(location.hash).toLowerCase(),a=$(".hor-menu");"click"===e||"set"===e?n=$(n):"match"===e&&a.find("li > a").each(function(){var e=$(this).attr("ui-sref");if(o&&e){if(o.is(e))return void(n=$(this))}else{var a=$(this).attr("href");if(a&&(a=a.toLowerCase(),a.length>1&&t.substr(1,a.length-1)==a.substr(1)))return void(n=$(this))}}),n&&0!=n.size()&&"javascript:;"!=n.attr("href")&&"javascript:;"!=n.attr("ui-sref")&&"#"!=n.attr("href")&&"#"!=n.attr("ui-sref")&&(a.find("li.active").removeClass("active"),a.find("li > a > .selected").remove(),a.find("li.open").removeClass("open"),n.parents("li").each(function(){$(this).addClass("active"),1===$(this).parent("ul.navbar-nav").size()&&$(this).find("> a").append('<span class="selected"></span>')}))},s=function(){var e=App.getViewPort().width;$(".page-header-menu");e>=o?$(".page-header-menu").css("display","block"):o>e&&$(".page-header-menu").css("display","none")},r=function(){return},p=function(){var e=100,n=500;navigator.userAgent.match(/iPhone|iPad|iPod/i)?$(window).bind("touchend touchcancel touchleave",function(o){$(this).scrollTop()>e?$(".scroll-to-top").fadeIn(n):$(".scroll-to-top").fadeOut(n)}):$(window).scroll(function(){$(this).scrollTop()>e?$(".scroll-to-top").fadeIn(n):$(".scroll-to-top").fadeOut(n)}),$(".scroll-to-top").click(function(e){return e.preventDefault(),$("html, body").animate({scrollTop:0},n),!1})};return{initHeader:function(e){t(),a(),App.addResizeHandler(s),App.isAngularJsApp()&&i("match",null,e)},initContent:function(){r()},initFooter:function(){p()},init:function(){this.initHeader(),this.initContent(),this.initFooter()},setMainMenuActiveLink:function(e,n){i(e,n)},setAngularJsMainMenuActiveLink:function(e,n,o){i(e,n,o)},closeMainMenu:function(){$(".hor-menu").find("li.open").removeClass("open"),App.getViewPort().width<o&&$(".page-header-menu").is(":visible")&&$(".page-header .menu-toggler").click()},getLayoutImgPath:function(){return App.getAssetsPath()+e},getLayoutCssPath:function(){return App.getAssetsPath()+n}}}();App.isAngularJsApp()===!1&&jQuery(document).ready(function(){Layout.init()});

Binary file not shown.