All Downloads are FREE. Search and download functionalities are using the official Maven repository.

open_admin_style.js.admin.blc-admin.js Maven / Gradle / Ivy

/* Utility methods provided by Broadleaf Commerce for admin */
var BLCAdmin = (function($) {
    
	// This will keep track of our current active modals so that we are able to overlay them
	var modals = [];
	var preValidationFormSubmitHandlers = [];
	var validationFormSubmitHandlers = [];
	var postValidationFormSubmitHandlers = [];
	var initializationHandlers = [];
	var updateHandlers = [];
	var stackedModalOptions = {
	    left: 20,
	    top: 20
	}
	
	/**
	 * Initialize necessary font mappings for Redactor
	 */
	var oFontMap = {
	    arial: ["Arial", "Arial, Helvetica, sans-serif"],
	    arialblack: ["Arial Black", '"Arial Black", Gadget, sans-serif'],
	    comicsans: ["Courier New", '"Courier New", Courier, monospace'],
	    courier: ["Comic Sans", '"Comic Sans MS", cursive, sans-serif'],
	    impact: ["Impact", 'Impact, Charcoal, sans-serif'],
	    lucida: ["Lucida", '"Lucida Sans Unicode", "Lucida Grande", sans-serif'],
	    lucidaconsole: ["Lucida Console", '"Lucida Console", Monaco, monospace'],
	    georgia: ["Georgia", "Georgia, serif"],
	    palatino: ["Palatino Linotype", '"Palatino Linotype", "Book Antiqua", Palatino, serif'],
	    tahoma: ["Tahoma", "Tahoma, Geneva, sans-serif"],
	    times: ["Times New Roman", "Times, serif"],
	    trebuchet: ["Trebuchet", '"Trebuchet MS", Helvetica, sans-serif'],
	    verdana: ["Verdana", "Verdana, Geneva, sans-serif"] 
	};
    var oFontDropdown = {}
    $.each(oFontMap, function(iIndex, oFont){
        var sFontName = oFont[0];
        var sFontFace = oFont[1];
        oFontDropdown[iIndex] = {
            title: ""+sFontName+"",
            callback: function(obj, e, sFont){
                obj.execCommand("fontname", sFontFace);
            }
        }
    });
    
    function getModalSkeleton() {
        var $modal = $('
', { 'class' : 'modal' }); var $modalHeader = $('
', { 'class' : 'modal-header' }); $modalHeader.append($('

')); $modalHeader.append($('





© 2015 - 2025 Weber Informatics LLC | Privacy Policy