Skip to content

Commit

Permalink
Dev: last and final fitting to pjax loader
Browse files Browse the repository at this point in the history
  • Loading branch information
lacrioque committed Jul 18, 2017
1 parent f049b24 commit b2e451f
Show file tree
Hide file tree
Showing 52 changed files with 121 additions and 125 deletions.
2 changes: 1 addition & 1 deletion application/extensions/FlashMessage/assets/js/notify.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(document)(document).on('ready pjax:completed', ', function(){
$(document)(document).on('ready pjax:complete', ', function(){
if($('.side-body').length){
//$('#update-container').removeClass();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(document)(document).on('ready pjax:completed', ', function() {
$(document)(document).on('ready pjax:complete', ', function() {
var removeRow = function ()
{
// Don't remove last row.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ function getDefaultDateTimePickerSettings() {
}


$(document)(document).on('ready pjax:completed', ', function() {
$(document)(document).on('ready pjax:complete', ', function() {
prepareBsSwitchBoolean(gridId);
prepareBsSwitchInteger(gridId);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
* This JavaScript will reload the grid on page size change
*/

$(document)(document).on('ready pjax:completed', ', function() {
$(document)(document).on('ready pjax:complete', ', function() {
jQuery(function($)
{
jQuery(document).on("change", '#pageSize', function()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function loadPositionWidget()
});
}

$(document)(document).on('ready pjax:completed', ', function() {
$(document)(document).on('ready pjax:complete', ', function() {
// First, we load the position widget
loadPositionWidget();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14098,7 +14098,7 @@ var BFHTimezonesList = {
/* COLORPICKER DATA-API
* ============== */

$(document)(document).on('ready pjax:completed', ', function () {
$(document)(document).on('ready pjax:complete', ', function () {
$('div.bfh-colorpicker').each(function () {
var $colorpicker;
Expand Down Expand Up @@ -14308,7 +14308,7 @@ var BFHTimezonesList = {
/* COUNTRY DATA-API
* ============== */

$(document)(document).on('ready pjax:completed', ', function () {
$(document)(document).on('ready pjax:complete', ', function () {
$('form select.bfh-countries, span.bfh-countries, div.bfh-countries').each(function () {
var $countries;

Expand Down Expand Up @@ -14524,7 +14524,7 @@ var BFHTimezonesList = {
/* CURRENCY DATA-API
* ============== */

$(document)(document).on('ready pjax:completed', ', function () {
$(document)(document).on('ready pjax:complete', ', function () {
$('form select.bfh-currencies, span.bfh-currencies, div.bfh-currencies').each(function () {
var $currencies;

Expand Down Expand Up @@ -15106,7 +15106,7 @@ var BFHTimezonesList = {
/* DATEPICKER DATA-API
* ============== */

$(document)(document).on('ready pjax:completed', ', function () {
$(document)(document).on('ready pjax:complete', ', function () {
$('div.bfh-datepicker').each(function () {
var $datepicker;
Expand Down Expand Up @@ -15293,7 +15293,7 @@ var BFHTimezonesList = {
/* FONTS DATA-API
* ============== */

$(document)(document).on('ready pjax:completed', ', function () {
$(document)(document).on('ready pjax:complete', ', function () {
$('form select.bfh-fonts, span.bfh-fonts, div.bfh-fonts').each(function () {
var $fonts;

Expand Down Expand Up @@ -15476,7 +15476,7 @@ var BFHTimezonesList = {
/* FONTSIZES DATA-API
* ============== */

$(document)(document).on('ready pjax:completed', ', function () {
$(document)(document).on('ready pjax:complete', ', function () {
$('form select.bfh-fontsizes, span.bfh-fontsizes, div.bfh-fontsizes').each(function () {
var $fontSizes;

Expand Down Expand Up @@ -15681,7 +15681,7 @@ var BFHTimezonesList = {
/* GOOGLE FONTS DATA-API
* ============== */

$(document)(document).on('ready pjax:completed', ', function () {
$(document)(document).on('ready pjax:complete', ', function () {
$('form select.bfh-googlefonts, span.bfh-googlefonts, div.bfh-googlefonts').each(function () {
var $googleFonts;

Expand Down Expand Up @@ -15904,7 +15904,7 @@ var BFHTimezonesList = {
/* LANGUAGES DATA-API
* ============== */

$(document)(document).on('ready pjax:completed', ', function () {
$(document)(document).on('ready pjax:complete', ', function () {
$('form select.bfh-languages, span.bfh-languages, div.bfh-languages').each(function () {
var $languages;

Expand Down Expand Up @@ -16211,7 +16211,7 @@ var BFHTimezonesList = {
/* NUMBER DATA-API
* ============== */

$(document)(document).on('ready pjax:completed', ', function () {
$(document)(document).on('ready pjax:complete', ', function () {
$('form input[type="text"].bfh-number, form input[type="number"].bfh-number').each(function () {
var $number;
Expand Down Expand Up @@ -16485,7 +16485,7 @@ var BFHTimezonesList = {
/* PHONE DATA-API
* ============== */

$(document)(document).on('ready pjax:completed', ', function () {
$(document)(document).on('ready pjax:complete', ', function () {
$('form input[type="text"].bfh-phone, form input[type="tel"].bfh-phone, span.bfh-phone').each(function () {
var $phone;
Expand Down Expand Up @@ -16826,7 +16826,7 @@ var BFHTimezonesList = {
/* SELECTBOX DATA-API
* ============== */

$(document)(document).on('ready pjax:completed', ', function () {
$(document)(document).on('ready pjax:complete', ', function () {
$('div.bfh-selectbox').each(function () {
var $selectbox;
Expand Down Expand Up @@ -17054,7 +17054,7 @@ var BFHTimezonesList = {
/* SLIDER DATA-API
* ============== */

$(document)(document).on('ready pjax:completed', ', function () {
$(document)(document).on('ready pjax:complete', ', function () {
$('div.bfh-slider').each(function () {
var $slider;
Expand Down Expand Up @@ -17297,7 +17297,7 @@ var BFHTimezonesList = {
/* STATES DATA-API
* ============== */

$(document)(document).on('ready pjax:completed', ', function () {
$(document)(document).on('ready pjax:complete', ', function () {
$('form select.bfh-states, span.bfh-states, div.bfh-states').each(function () {
var $states;

Expand Down Expand Up @@ -17687,7 +17687,7 @@ var BFHTimezonesList = {
/* TIMEPICKER DATA-API
* ============== */

$(document)(document).on('ready pjax:completed', ', function () {
$(document)(document).on('ready pjax:complete', ', function () {
$('div.bfh-timepicker').each(function () {
var $timepicker;
Expand Down Expand Up @@ -17906,7 +17906,7 @@ var BFHTimezonesList = {
/* TIMEZONES DATA-API
* ============== */

$(document)(document).on('ready pjax:completed', ', function () {
$(document)(document).on('ready pjax:complete', ', function () {
$('form select.bfh-timezones, div.bfh-timezones').each(function () {
var $timezones;

Expand Down
31 changes: 17 additions & 14 deletions application/helpers/admin/htmleditor_helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -248,21 +248,24 @@ function getInlineEditor($fieldtype,$fieldname,$fieldtext, $surveyID=null,$gID=n
$htmlcode .= ""
. "<script type=\"text/javascript\">\n"
. "$(document).on('ready pjax:complete',
function(){ var $oCKeditorVarName = CKEDITOR.replace('$fieldname', {
customConfig : \"".Yii::app()->getConfig('adminscripts')."ckeditor-config.js\"
,LimeReplacementFieldsType : \"".$fieldtype."\"
,LimeReplacementFieldsSID : \"".$surveyID."\"
,LimeReplacementFieldsGID : \"".$gID."\"
,LimeReplacementFieldsQID : \"".$qID."\"
,LimeReplacementFieldsAction : \"".$action."\"
,LimeReplacementFieldsPath : \"".Yii::app()->getController()->createUrl("admin/limereplacementfields/sa/index/")."\"
,language:'".sTranslateLangCode2CK(Yii::app()->session['adminlang'])."'"
. $sFileBrowserAvailable
. $htmlformatoption
. $toolbaroption
."});
function(){
if($('#".$fieldname."').length >0){
var $oCKeditorVarName = CKEDITOR.replace('$fieldname', {
customConfig : \"".Yii::app()->getConfig('adminscripts')."ckeditor-config.js\"
,LimeReplacementFieldsType : \"".$fieldtype."\"
,LimeReplacementFieldsSID : \"".$surveyID."\"
,LimeReplacementFieldsGID : \"".$gID."\"
,LimeReplacementFieldsQID : \"".$qID."\"
,LimeReplacementFieldsAction : \"".$action."\"
,LimeReplacementFieldsPath : \"".Yii::app()->getController()->createUrl("admin/limereplacementfields/sa/index/")."\"
,language:'".sTranslateLangCode2CK(Yii::app()->session['adminlang'])."'"
. $sFileBrowserAvailable
. $htmlformatoption
. $toolbaroption
."});
\$('#$fieldname').parents('ul:eq(0)').addClass('editor-parent');
\$('#$fieldname').parents('ul:eq(0)').addClass('editor-parent');
}
});";

$htmlcode.= '</script>';
Expand Down
2 changes: 2 additions & 0 deletions application/views/admin/htmleditor/pop_editor_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ function closeme()
/*
try{ console.log('iGroupId: '+iGroupId); } catch (e){ console.log(e); }
*/
if($('textarea').length > 0){
CKEDITOR.on('instanceReady',CKeditor_OnComplete);
var oCKeditor = CKEDITOR.replace( 'MyTextarea' , { height : '350',
width : '98%',
Expand All @@ -54,6 +55,7 @@ function closeme()
LimeReplacementFieldsPath : "<?php echo $this->createUrl("/admin/limereplacementfields/sa/index"); ?>",
language : "<?php echo $ckLanguage ?>"
<?php echo $htmlformatoption; ?> });
}
});

function CKeditor_OnComplete( evt )
Expand Down
7 changes: 3 additions & 4 deletions assets/scripts/admin/admin_core.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ hasFormValidation= typeof document.createElement( 'input' ).checkValidity == 'fu
/* See function */
fixAccordionPosition();

LS.onDocumentReady.AdminCore = function(){
$(document).on('ready pjax:complete', function(){

initializeAjaxProgress();
tableCellAdapters();
Expand Down Expand Up @@ -247,9 +247,8 @@ LS.onDocumentReady.AdminCore = function(){

$('[data-is-bootstrap-switch]').bootstrapSwitch();

};
});

$(document).on('ready pjax:completed', function(){ LS.onDocumentReady.AdminCore();});


function qTypeDropdownInit()
Expand Down Expand Up @@ -285,7 +284,7 @@ function qTypeDropdownInit()
});
};

$(document).on('ready pjax:completed', onDocumentReadyAdminCoreq);
$(document).on('ready pjax:complete', onDocumentReadyAdminCoreq);
}


Expand Down
4 changes: 2 additions & 2 deletions assets/scripts/admin/answers.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ Ls.onDocumentReady.Answers = function(){
$(document).on("click", '.btnlsbrowser', lsbrowser );
};

$(document).on('ready pjax:completed', Ls.onDocumentReady.Answers);
$(document).on('pjax:completed',Ls.onDocumentReady.Answers);
$(document).on('ready pjax:complete', Ls.onDocumentReady.Answers);
$(document).on(' pjax:complete',Ls.onDocumentReady.Answers);

function deleteinput()
{
Expand Down
4 changes: 2 additions & 2 deletions assets/scripts/admin/assessments.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,5 @@ LS.onDocumentReady.Asessements = function(){
)
};

$(document).on('ready pjax:completed', LS.onDocumentReady.Asessements);
$(document).on('pjax:completed',LS.onDocumentReady.Asessements);
$(document).on('ready pjax:complete', LS.onDocumentReady.Asessements);
$(document).on(' pjax:complete',LS.onDocumentReady.Asessements);
7 changes: 2 additions & 5 deletions assets/scripts/admin/attributeMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Namespace
var LS = LS || { onDocumentReady: {} };

LS.onDocumentReady.AttributeMap = function(){
$(document).on('ready pjax:complete', function(){

var height = $(document).height();
var width = $(document).width();
Expand Down Expand Up @@ -170,7 +170,4 @@ LS.onDocumentReady.AttributeMap = function(){
});

$('.tokenatt .panel-default .tokenAttributeId').disableSelection();
};

$(document).on('ready pjax:completed', LS.onDocumentReady.AttributeMap);
$(document).on('pjax:completed',LS.onDocumentReady.AttributeMap);
});
4 changes: 2 additions & 2 deletions assets/scripts/admin/attributeMapCSV.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,5 +242,5 @@ LS.onDocumentReady.AttributeMapCSV = function() {
});
};

$(document).on('ready pjax:completed', LS.onDocumentReady.AttributeMapCSV);
$(document).on('pjax:completed',LS.onDocumentReady.AttributeMapCSV);
$(document).on('ready pjax:complete', LS.onDocumentReady.AttributeMapCSV);
$(document).on(' pjax:complete',LS.onDocumentReady.AttributeMapCSV);
4 changes: 2 additions & 2 deletions assets/scripts/admin/attributeMapToken.js
Original file line number Diff line number Diff line change
Expand Up @@ -165,5 +165,5 @@ var onDocumentReadyAttributeMapToken = function(){

};

$(document).on('ready pjax:completed', onDocumentReadyAttributeMapToken);
$(document).on('pjax:completed',onDocumentReadyAttributeMapToken);
$(document).on('ready pjax:complete', onDocumentReadyAttributeMapToken);
$(document).on(' pjax:complete',onDocumentReadyAttributeMapToken);
2 changes: 1 addition & 1 deletion assets/scripts/admin/comfortupdate/comfortupdate.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(document).ready(function(){
$(document).on('ready pjax:complete', function(){
// If no step is required, then the checkupdates buttons is display by php controler.
// When user click on this button, it build the comfort updater buttons.
//$("#ajaxcheckupdate").buildComfortButtons();
Expand Down
2 changes: 1 addition & 1 deletion assets/scripts/admin/comfortupdater/comfortupdater.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
$(document).ready(function(){
$(document).on('ready pjax:complete', function(){
// If no step is required, then the checkupdates buttons is display by php controler.
// When user click on this button, it build the comfort updater buttons.
//$("#ajaxcheckupdate").buildComfortButtons();
Expand Down
4 changes: 2 additions & 2 deletions assets/scripts/admin/conditions.js
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ function jquery_goodchars(e, goods)
}


$(document).on('ready pjax:completed', LS.onDocumentReady.Conditions);
$(document).on('pjax:completed',LS.onDocumentReady.Conditions);
$(document).on('ready pjax:complete', LS.onDocumentReady.Conditions);
$(document).on(' pjax:complete',LS.onDocumentReady.Conditions);

LS.onDocumentReady.Conditions = function(){

Expand Down
6 changes: 2 additions & 4 deletions assets/scripts/admin/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
var LS = LS || { onDocumentReady: {} };

// $Id: labels.js 8649 2010-04-28 21:38:53Z c_schmitz $
LS.onDocumentReady.loadCKEditorFields = function(){
$(document).on('ready pjax:complete', function(){

if (sHTMLEditorMode=='inline') {
$('textarea.fulledit').ckeditor(function() { /* callback code */ }, { toolbar : sHTMLEditorMode,
Expand All @@ -13,6 +13,4 @@ LS.onDocumentReady.loadCKEditorFields = function(){
customConfig : '/scripts/admin/ckeditor-config.js' });
}

}
$(document).on('ready pjax:completed', LS.onDocumentReady.loadCKEditorFields);
$(document).on('pjax:completed', LS.onDocumentReady.loadCKEditorFields);
});
5 changes: 1 addition & 4 deletions assets/scripts/admin/emailtemplates.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
// Namespace
var LS = LS || { onDocumentReady: {} };

$(document).on('ready pjax:completed', LS.onDocumentReady.updateCKEditorFields);
$(document).on('pjax:completed', LS.onDocumentReady.updateCKEditorFields);

LS.onDocumentReady.updateCKEditorFields = function(){
$(document).on('ready pjax:complete', function(){
/* handle=$('.tabsinner').tabs(
{
show: loadHTMLEditor
Expand Down
4 changes: 2 additions & 2 deletions assets/scripts/admin/exportresults.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
// Namespace
var LS = LS || { onDocumentReady: {} };

$(document).on('ready pjax:completed', LS.onDocumentReady.ExportResults);
$(document).on('pjax:completed',LS.onDocumentReady.ExportResults);
$(document).on('ready pjax:complete', LS.onDocumentReady.ExportResults);
$(document).on(' pjax:complete',LS.onDocumentReady.ExportResults);

LS.onDocumentReady.ExportResults = function(){
updateColumnCountDisplay();
Expand Down
4 changes: 2 additions & 2 deletions assets/scripts/admin/expression.js
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
/* Manage javascript for expression administration
* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&dn=gpl-2.0.txt GNU/GPL License v2 or later
*/
$(document).on('ready pjax:completed', function(){
$(document).on('ready pjax:complete', function(){
// Tooltip inside em-var
$(".em-expression").tooltip();
});

$(document).on('pjax:completed',function(){
$(document).on(' pjax:complete',function(){
// Tooltip inside em-var
$(".em-expression").tooltip();
});
Expand Down

0 comments on commit b2e451f

Please sign in to comment.