/* ** dexp_layouts = []; ** dexp_current_layour; */ var dexp_current_section = ''; var dexp_current_region = ''; var dexp_current_layout = 0; var dexp_default_layout = { 'key': 'new_layout', 'title': 'New layout', 'sections': [], 'weight': 100 }; var dexp_default_section = { 'layout': 0, 'regions': [], 'weight': 100 }; var dexp_default_region = { 'weight': 100 } var keyString = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; base64Encode = function (c) { var a = ""; var k, h, f, j, g, e, d; var b = 0; c = UTF8Encode(c); while (b < c.length) { k = c.charCodeAt(b++); h = c.charCodeAt(b++); f = c.charCodeAt(b++); j = k >> 2; g = ((k & 3) << 4) | (h >> 4); e = ((h & 15) << 2) | (f >> 6); d = f & 63; if (isNaN(h)) { e = d = 64 } else { if (isNaN(f)) { d = 64 } } a = a + keyString.charAt(j) + keyString.charAt(g) + keyString.charAt(e) + keyString.charAt(d) } return a }; UTF8Encode = function (b) { b = b.replace(/\x0d\x0a/g, "\x0a"); var a = ""; for (var e = 0; e < b.length; e++) { var d = b.charCodeAt(e); if (d < 128) { a += String.fromCharCode(d) } else { if ((d > 127) && (d < 2048)) { a += String.fromCharCode((d >> 6) | 192); a += String.fromCharCode((d & 63) | 128) } else { a += String.fromCharCode((d >> 12) | 224); a += String.fromCharCode(((d >> 6) & 63) | 128); a += String.fromCharCode((d & 63) | 128) } } } return a }; (function ($) { /* ** add region object to html list */ function regionToHtml(region) { region.colxs = region.colxs || 12; region.colsm = region.colsm || 12; region.colmd = region.colmd || region.size || 6; region.collg = region.collg || region.size || 6; region.custom_class = region.custom_class || ''; return $('
  • ').data({ key: region.key, title: region.title, colxs: region.colxs, colsm: region.colsm, colmd: region.colmd, collg: region.collg, custom_class: region.custom_class }).addClass('dexp-region').addClass('col-xs-' + region.colxs).addClass('col-sm-' + region.colsm).addClass('col-md-' + region.colmd).addClass('col-lg-' + region.collg).html('
    ' + region.title + '
    '); } function sectionToHtml(section) { var $section = $('
  • ').addClass('dexp-section section-' + section.key).data({ key: section.key, title: section.title, fullwidth: section.fullwidth || 'no', backgroundcolor: section.backgroundcolor || '', sticky: section.sticky || false, vphone: section.vphone || false, vtablet: section.vtablet || false, vdesktop: section.vdesktop || false, hphone: section.hphone || false, htablet: section.htablet || false, hdesktop: section.hdesktop || false, colpadding: section.colpadding || '', custom_class: section.custom_class || '' }); if (section.backgroundcolor != '') { $section.css({ backgroundColor: section.backgroundcolor }); } if (section.key != 'unassigned') { var $sectionHeader = $('
    ' + section.title + '
    '); } else { var $sectionHeader = $('
    ' + section.title + '
    '); } var $sectionContent = $('