Commit 99595900 authored by Sigrid Suski's avatar Sigrid Suski
Browse files

(#) edit.js no longer compressed as it causes problems

	(+) Possibility not to load but to use specific fonts
parent 238a90e5
......@@ -114,6 +114,8 @@
<option value="font-awesome-3-local" label="SECN.CFG.ICONS_FONT_AWESOME_3_LOCAL"/>
</values>
</field>
<field type="toggle" name="spcfg[template.icon_fonts_noload]" value="spcfg[template.icon_fonts_noload]"
label="SECN.CFG.ICONS_FONT_NOLOAD" prefix="yes_no"/>
</fieldset>
<fieldset label="CFG.DEVTEMPLATE">
<field type="toggle" name="spcfg[template.development]" value="template.development"
......
......@@ -85,6 +85,7 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
(+) The Joomla menu page heading (if any) will be shown instead of the SobiPro page heading
(+) Added support for emojis in field_data and language
(+) Changed repository SSL certificate added
(+) Possibility not to load but to use specific fonts
(!) Extracting Sobi Framework automatically in case PHAR isn't usable
(!) Separate icon from label in Button field
......@@ -127,7 +128,8 @@ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
(#) {payment.methods.html} placeholder doesn't generate correct HTML output for Paypal payment method
(#) Shown number of characters in textarea with HTML code corrected (if limitation is used)
(#) Wrong amount for Paypal payment if tax is set to 0 (Issue #62)
(#) edit.js no longer compressed as it causes problems
### 1.4.3 (19 October 2017)
......
......@@ -109,7 +109,7 @@ final class SPHeader
if ( $font == 'font-awesome-3-local' ) {
$this->addCssFile( 'sobifont' );
}
elseif ( Sobi::Cfg( 'icon-fonts.' . $font ) ) {
elseif ((Sobi::Cfg( 'template.icon_fonts_noload', '0' ) == '0') && Sobi::Cfg( 'icon-fonts.' . $font ) ) {
$this->addHeadLink( Sobi::Cfg( 'icon-fonts.' . $font ), null, null, 'stylesheet' );
}
}
......
eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('2.4(Y).1w(5(){8 v=\'<f l="6"><f l="1x"></f><f l="6-1y"><f l="1z-1A J 1B">x</f><Z l="6-10"></Z><f l="6-11"><p></p></f></f></f>\';2.4(\'a[12=6]\').6({\'1C\':13,\'1D\':\'r\',\'v\':v}).r(5(e){e.1E();8 g=2.4(c);g.14().m(\'.J\').r(5(){g.6(\'B\')})});1F(5(){1G 15()},1H);5 15(){"1I 1J";c.16=2.4(\'.17-1K\');8 g=c;c.16.w(5(i,7){7=2.4(7);7.y=2.4(\'#\'+7.K(\'1L\').L(\'-17\',\'-z-h\'));7.M=7.y.m(\'*\').1M(\'1N\');7.N=7.y.m(\'1O\').14();7.O=5(){c.M.K(\'P\',\'P\');c.y.18().C(\'19\',\'0.3\');c.N.C(\'1a\',\'1P\')};7.O();7.1Q(5(){j(2.4(c).1R(\':1S\')){7.M.1T(\'P\');7.y.18().C(\'19\',\'1\');7.N.C(\'1a\',\'\')}D{7.O()}})});c.Q=5(){8 R=2.4(\'#1b\').1U();2.4(2.4(\'#1b\').m(\':1V\')).w(5(i,b){8 E=2.4(b);j(E.1W(\'1X\')){R+=\'&\'+E.K(\'1Y\')+\'=\'+E.1c()}});2.4.1Z({\'1d\':\'20.21\',\'n\':R,\'S\':\'22\',\'23\':\'24\',25:5(9){j(9.s.S==\'t\'){g.1e(9)}D{j(9.1f.26==13){T.27.L(9.1f.1d)}D j(9.s.S==\'28\'){2.4(9.s.U).29(2.4(\'#2\'));8 u=2.4(\'#V\').m(\'.u\').u();u.1g(\'1h\',5(){2.4(\'#V\').W()});u.1g(\'1h.2a.u\',5(){2.4(\'#V\').W()})}}}})};c.F=5(6,d,h){6.6(\'B\');d.1i(\'B\');6.W();h.1j(\'t\')};c.1e=5(9){8 z=2.4(\'#\'+9.n.t);8 d=2.4(\'#\'+9.n.t+\'-s\');8 h=2.4(\'#\'+9.n.t+\'-h\');h.1i(\'t\');8 G=\'2b\';j(d.1k){8 6=2.4(\'<a l="X-z-2c" n-G="\'+G+\'" 12="6" n-11="\'+9.s.U+\'" n-2d-10="\'+2.2e(\'2f\')+\'">&2g;</a>\');d.2h(6);d.1j(\'B\');6.6({\'v\':v});6.6(\'2i\');d.m(\'.J\').r(5(){g.F(6,d,h)});d.2j();z.1l(5(){g.F(6,d,h)});j(G==\'2k\'){h.m(\':z\').1l(5(){g.F(6,d,h)})}}D{2l(9.s.U)}};2.4(\'.X-2m\').r(5(e){1m();1n();g.Q()});2.4(\'.X-1o\').r(5(e){2.4(\'#2n\').1c(\'2o.1o\');g.Q()})}});5 1n(){o{8 1p=2p.2q(H.1q);2.4.w(1p,5(i,I){j(I!=0){H.1r(\'1s\',1t,I);H.1r(\'1s\',1t,I)}})}q(e){}8 A=[\'2r\',\'2s\',\'2t\'];2u(8 i=0;i<A.1k;i++){o{T.2v(A[i])}q(e){}o{T.2w(A[i])}q(e){}o{2.4(Y).2x(A[i])}q(e){}o{2.4.w(1u.1v,5(i,k){k.2y();1u.L(i)})}q(e){}}o{H.2z()}q(e){}2.4.w(2A.1q.1v,5(){o{c.2B()}q(e){}})}5 1m(){}',62,162,'||SobiPro||jQuery|function|popover|element|var|response|||this|attach||div|proxy|container||if||class|find|data|try||catch|click|message|error|modal|template|each||targetContainer|input|events|hide|css|else|bt|dismissAlert|placement|tinyMCE|eid|close|attr|replace|toggleTarget|targetIframes|disableTargets|disabled|sendRequest|request|type|window|text|SpPaymentModal|remove|sobipro|document|h3|title|content|rel|true|parent|SobiProEntryEdit|boxes|payment|children|opacity|display|spEntryForm|val|url|errorHandler|redirect|on|hidden|addClass|removeClass|length|focus|SPTriggerSpinner|SPTriggerFrakingWYSIWYGEditors|cancel|Editors|editors|execCommand|mceToggleEditor|false|CKEDITOR|instances|ready|arrow|inner|pull|right|spclose|html|trigger|preventDefault|setTimeout|new|1000|use|strict|box|id|not|option|iframe|none|change|is|checked|removeAttr|serialize|button|hasClass|active|name|ajax|index|php|post|dataType|json|success|execute|location|info|appendTo|bs|bottom|note|original|Txt|ATTENTION|nbsp|append|show|ScrollTo|top|alert|submit|SP_task|entry|Object|keys|unload|onbeforeunload|onunload|for|dispatchEvent|fireEvent|triggerHandler|destroy|triggerSave|Joomla|save'.split('|'),0,{}))
\ No newline at end of file
/**
* @package: SobiPro Library
*
* @author
* Name: Sigrid Suski & Radek Suski, Sigsiu.NET GmbH
* Email: sobi[at]sigsiu.net
* Url: https://www.Sigsiu.NET
*
* @copyright Copyright (C) 2006 - 2018 Sigsiu.NET GmbH (https://www.sigsiu.net). All rights reserved.
* @license GNU/LGPL Version 3
* This program is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3
* as published by the Free Software Foundation, and under the additional terms according section 7 of GPL v3.
* See http://www.gnu.org/licenses/lgpl.html and https://www.sigsiu.net/licenses.
* This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* This is the default JavaScript for the edit screen. It requires a default or default based frontend template
*/
SobiPro.jQuery( document ).ready( function () {
var template = '<div class="popover"><div class="arrow"></div><div class="popover-inner"><div class="pull-right close spclose">x</div><h3 class="popover-title"></h3><div class="popover-content"><p></p></div></div></div>';
SobiPro.jQuery( 'a[rel=popover]' )
.popover( { 'html': true, 'trigger': 'click', 'template': template } )
.click( function ( e ) {
e.preventDefault();
var proxy = SobiPro.jQuery( this );
proxy.parent().find( '.close' ).click( function () {
proxy.popover( 'hide' );
} );
} );
setTimeout( function () {
new SobiProEntryEdit();
}, 1000 );
function SobiProEntryEdit()
{
"use strict";
this.boxes = SobiPro.jQuery( '.payment-box' );
var proxy = this;
this.boxes.each( function ( i, element ) {
element = SobiPro.jQuery( element );
element.targetContainer = SobiPro.jQuery( '#' + element.attr( 'id' ).replace( '-payment', '-input-container' ) );
element.toggleTarget = element.targetContainer.find( '*' ).not( 'option' );
element.targetIframes = element.targetContainer.find( 'iframe' ).parent();
element.disableTargets = function () {
this.toggleTarget.attr( 'disabled', 'disabled' );
this.targetContainer.children().css( 'opacity', '0.3' );
this.targetIframes.css( 'display', 'none' );
};
element.disableTargets();
element.change( function () {
if ( SobiPro.jQuery( this ).is( ':checked' ) ) {
element.toggleTarget.removeAttr( 'disabled' );
element.targetContainer.children().css( 'opacity', '1' );
element.targetIframes.css( 'display', '' );
}
else {
element.disableTargets();
}
} );
} );
this.sendRequest = function () {
var request = SobiPro.jQuery( '#spEntryForm' ).serialize();
SobiPro.jQuery( SobiPro.jQuery( '#spEntryForm' ).find( ':button' ) ).each( function ( i, b ) {
var bt = SobiPro.jQuery( b );
if ( bt.hasClass( 'active' ) ) {
request += '&' + bt.attr( 'name' ) + '=' + bt.val();
}
} );
SobiPro.jQuery.ajax( {
'url': 'index.php',
'data': request,
'type': 'post',
'dataType': 'json',
success: function ( response ) {
if ( response.message.type == 'error' ) {
proxy.errorHandler( response );
}
else {
if ( response.redirect.execute == true ) {
window.location.replace( response.redirect.url );
}
else if ( response.message.type == 'info' ) {
SobiPro.jQuery( response.message.text ).appendTo( SobiPro.jQuery( '#SobiPro' ) );
var modal = SobiPro.jQuery( '#SpPaymentModal' ).find( '.modal' ).modal();
modal.on( 'hidden', function () {
SobiPro.jQuery( '#SpPaymentModal' ).remove();
} );
modal.on( 'hidden.bs.modal', function () {
SobiPro.jQuery( '#SpPaymentModal' ).remove();
} );
}
}
}
} );
};
this.dismissAlert = function ( popover, attach, container ) {
popover.popover( 'hide' );
attach.addClass( 'hide' );
popover.remove();
container.removeClass( 'error' );
};
this.errorHandler = function ( response ) {
var input = SobiPro.jQuery( '#' + response.data.error );
var attach = SobiPro.jQuery( '#' + response.data.error + '-message' );
var container = SobiPro.jQuery( '#' + response.data.error + '-container' );
container.addClass( 'error' );
var placement = 'bottom';
if ( attach.length ) {
var popover = SobiPro.jQuery( '<a class="sobipro-input-note" data-placement="' + placement + '" rel="popover" data-content="' + response.message.text + '" data-original-title="' + SobiPro.Txt( 'ATTENTION' ) + '">&nbsp;</a>' );
attach.append( popover );
attach.removeClass( 'hide' );
popover.popover( { 'template': template } );
popover.popover( 'show' );
attach.find( '.close' ).click( function () {
proxy.dismissAlert( popover, attach, container );
} );
attach.ScrollTo();
input.focus( function () {
proxy.dismissAlert( popover, attach, container );
} );
if ( placement == 'top' ) {
container.find( ':input' ).focus( function () {
proxy.dismissAlert( popover, attach, container );
} );
}
}
else {
alert( response.message.text );
}
};
SobiPro.jQuery( '.sobipro-submit' ).click( function ( e ) {
SPTriggerSpinner();
SPTriggerFrakingWYSIWYGEditors();
proxy.sendRequest();
} );
SobiPro.jQuery( '.sobipro-cancel' ).click( function ( e ) {
SobiPro.jQuery( '#SP_task' ).val( 'entry.cancel' );
proxy.sendRequest();
} );
}
} );
function SPTriggerFrakingWYSIWYGEditors()
{
try {
var Editors = Object.keys( tinyMCE.editors );
SobiPro.jQuery.each( Editors, function ( i, eid ) {
if ( eid != 0 ) {
// facepalm - mceAddControl is simply not working
tinyMCE.execCommand( 'mceToggleEditor', false, eid );
tinyMCE.execCommand( 'mceToggleEditor', false, eid );
}
} );
}
catch ( e ) {
}
var events = [ 'unload', 'onbeforeunload', 'onunload' ];
for ( var i = 0; i < events.length; i ++ ) {
try {
window.dispatchEvent( events[ i ] );
}
catch ( e ) {
}
try {
window.fireEvent( events[ i ] );
}
catch ( e ) {
}
try {
SobiPro.jQuery( document ).triggerHandler( events[ i ] );
}
catch ( e ) {
}
try {
SobiPro.jQuery.each( CKEDITOR.instances, function ( i, k ) {
k.destroy();
CKEDITOR.replace( i );
} )
}
catch ( e ) {
}
}
try {
tinyMCE.triggerSave();
}
catch ( e ) {
}
SobiPro.jQuery.each( Joomla.editors.instances, function () {
try {
this.save();
}
catch ( e ) {
}
} );
}
function SPTriggerSpinner()
{
}
......@@ -181,6 +181,7 @@ SP.SECN.CFG.ICONS_FONT_AWESOME_4_4 = "Font Awesome 4 (4x)"
SP.SECN.CFG.ICONS_FONT_AWESOME_4_5 = "Font Awesome 4 (5x)"
SP.SECN.CFG.ICONS_MATERIAL = "Google's Material Icons"
SP.SECN.CFG.ICONS_FONT_AWESOME_3_LOCAL = "Font Awesome 3 local (default)"
SP.SECN.CFG.ICONS_FONT_NOLOAD="Joomla loads fonts"
SP.OPT_FONTS_ICONS = "Font Icons"
SP.CAT.USE_ICON_FONT = "Use Icons Font"
SP.CAT.ICON_FONT_ADD_CLASS = "Add Font Class"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment