Edit File by line

Deprecated: str_replace(): Passing null to parameter #2 ($replace) of type array|string is deprecated in /home/sportsfever/public_html/filemanger/function.php on line 93

Warning: Undefined array key "page_file_edit_line" in /home/sportsfever/public_html/filemanger/edit_text_line.php on line 32
/home/sportsfe.../httpdocs/clone/wp-conte.../plugins/flow-flo.../js
File: admin.js
cancelBoostChange = true;
[4500] Fix | Delete
[4501] Fix | Delete
break;
[4502] Fix | Delete
}
[4503] Fix | Delete
}
[4504] Fix | Delete
[4505] Fix | Delete
// because if cancelled, input is set to checked false
[4506] Fix | Delete
if ( ! cancelBoostChange ) FlowFlow.availableBoosts++;
[4507] Fix | Delete
}
[4508] Fix | Delete
[4509] Fix | Delete
FlowFlow.$boostSmartElement.html( FlowFlow.availableBoosts + ' boost' + ( FlowFlow.availableBoosts != 1 ? 's' : '' ) );
[4510] Fix | Delete
[4511] Fix | Delete
}
[4512] Fix | Delete
[4513] Fix | Delete
}
[4514] Fix | Delete
[4515] Fix | Delete
if ( ! cancelUpdatingModel ) applyChange ();
[4516] Fix | Delete
[4517] Fix | Delete
function applyChange () {
[4518] Fix | Delete
[4519] Fix | Delete
changed[ id ] = _.clone( modelFeeds[ id ] );
[4520] Fix | Delete
changed[ id ][ 'state' ] = isFresh ? 'created' : 'changed';
[4521] Fix | Delete
[4522] Fix | Delete
if ($t.is(':radio')) {
[4523] Fix | Delete
val = $t.is(':checked') ? ($t.attr('value') || 'yep') : 'nope'
[4524] Fix | Delete
}
[4525] Fix | Delete
[4526] Fix | Delete
if ($t.is(':checkbox')) {
[4527] Fix | Delete
$group = self.$el.find('[name="' + name + '"]');
[4528] Fix | Delete
if ($group.length > 1) {
[4529] Fix | Delete
// group
[4530] Fix | Delete
val = {};
[4531] Fix | Delete
$group.each(function () {
[4532] Fix | Delete
var cbVal = this.value;
[4533] Fix | Delete
if (this.checked) val[cbVal] = 'yep';
[4534] Fix | Delete
});
[4535] Fix | Delete
} else {
[4536] Fix | Delete
val = $t.is(':checked') ? 'yep' : 'nope'
[4537] Fix | Delete
}
[4538] Fix | Delete
}
[4539] Fix | Delete
[4540] Fix | Delete
self.trigger('changeFeedInModel', {name: name.replace(id + '-', ''), val: val, id: id })
[4541] Fix | Delete
}
[4542] Fix | Delete
[4543] Fix | Delete
},
[4544] Fix | Delete
[4545] Fix | Delete
addFeedInModel: function ( $view, id, errors ) {
[4546] Fix | Delete
[4547] Fix | Delete
var obj = {};
[4548] Fix | Delete
var modelFeeds = this.model.get('feeds'), freshFeeds;
[4549] Fix | Delete
[4550] Fix | Delete
$view.find(':input').each(function (i, el) {
[4551] Fix | Delete
var $t = $(this);
[4552] Fix | Delete
var name = $t.attr('name');
[4553] Fix | Delete
name = name.replace(/\w\w\d+?\-/, '');
[4554] Fix | Delete
if ($t.is(':radio')) {
[4555] Fix | Delete
if ($t.is(':checked')) {
[4556] Fix | Delete
obj[name] = $t.val();
[4557] Fix | Delete
}
[4558] Fix | Delete
} else if ($t.is(':checkbox')) {
[4559] Fix | Delete
if ($t.is(':checked')) {
[4560] Fix | Delete
obj[name] = 'yep';
[4561] Fix | Delete
} else {
[4562] Fix | Delete
obj[name] = 'nope';
[4563] Fix | Delete
}
[4564] Fix | Delete
}
[4565] Fix | Delete
else {
[4566] Fix | Delete
obj[name] = $.trim($t.val());
[4567] Fix | Delete
}
[4568] Fix | Delete
});
[4569] Fix | Delete
[4570] Fix | Delete
obj['id'] = id;
[4571] Fix | Delete
obj['type'] = $view.data('feed-type');
[4572] Fix | Delete
obj['include'] = $view.parent().next().find('input[name="include"]').val() || '';
[4573] Fix | Delete
obj['filter-by-words'] = $view.parent().next().find('input[name="filter-by-words"]').val() || '';
[4574] Fix | Delete
if (errors) obj['errors'] = errors;
[4575] Fix | Delete
if (modelFeeds) {
[4576] Fix | Delete
modelFeeds[id] = obj;
[4577] Fix | Delete
} else {
[4578] Fix | Delete
freshFeeds = {};
[4579] Fix | Delete
freshFeeds[id] = obj;
[4580] Fix | Delete
this.model.set('feeds', freshFeeds);
[4581] Fix | Delete
}
[4582] Fix | Delete
},
[4583] Fix | Delete
[4584] Fix | Delete
validateFeedCfg: function ($t) {
[4585] Fix | Delete
var $cont = $t.closest('.networks-content').find('.feed-view-visible');
[4586] Fix | Delete
var $contentInput = $cont.find('input[name$=content]');
[4587] Fix | Delete
$cont.find(':input').removeClass('validation-error');
[4588] Fix | Delete
[4589] Fix | Delete
if ($contentInput.length && !$contentInput.val()) {
[4590] Fix | Delete
setTimeout(function(){$contentInput.addClass('validation-error');},0);
[4591] Fix | Delete
$('html, body').animate({
[4592] Fix | Delete
scrollTop: $contentInput.offset().top - 150
[4593] Fix | Delete
}, 300);
[4594] Fix | Delete
return false;
[4595] Fix | Delete
}
[4596] Fix | Delete
return true;
[4597] Fix | Delete
},
[4598] Fix | Delete
[4599] Fix | Delete
toggleErrorFeeds: function (e) {
[4600] Fix | Delete
[4601] Fix | Delete
var $list = this.$el.find('#feeds-list');
[4602] Fix | Delete
var $t = $(e.currentTarget);
[4603] Fix | Delete
var feeds = this.model.get('feeds');
[4604] Fix | Delete
var changed = this.model.get('feeds_changed');
[4605] Fix | Delete
var feedsArr = Object.keys( feeds );
[4606] Fix | Delete
[4607] Fix | Delete
[4608] Fix | Delete
if ( this.showErrorFeedsOnly ) {
[4609] Fix | Delete
$list.find( '.tr-error-empty' ).remove();
[4610] Fix | Delete
// $list.removeClass('show-only-errors');
[4611] Fix | Delete
this.showErrorFeedsOnly = false;
[4612] Fix | Delete
$t.html('Show only error feeds');
[4613] Fix | Delete
[4614] Fix | Delete
this.renderFeedsList( changed, this.showErrorFeedsOnly );
[4615] Fix | Delete
if (feedsArr.length > 8) {
[4616] Fix | Delete
this.$el.addClass('jp-visible');
[4617] Fix | Delete
}
[4618] Fix | Delete
} else {
[4619] Fix | Delete
// $list.addClass('show-only-errors');
[4620] Fix | Delete
if ( ! $list.has( '.feed-row:visible' ).length ) {
[4621] Fix | Delete
// no errors
[4622] Fix | Delete
$list.append( '<tr class="tr-error tr-error-empty"><td colspan="6">Yay! No error feeds.</td></tr>' );
[4623] Fix | Delete
}
[4624] Fix | Delete
$t.html('Show all feeds');
[4625] Fix | Delete
this.showErrorFeedsOnly = true;
[4626] Fix | Delete
[4627] Fix | Delete
this.renderFeedsList( changed, this.showErrorFeedsOnly );
[4628] Fix | Delete
[4629] Fix | Delete
this.$el.removeClass('jp-visible');
[4630] Fix | Delete
}
[4631] Fix | Delete
[4632] Fix | Delete
return false;
[4633] Fix | Delete
},
[4634] Fix | Delete
[4635] Fix | Delete
toggleFilterInput: function ( e ) {
[4636] Fix | Delete
var $hidden = $('.search-container:hidden');
[4637] Fix | Delete
[4638] Fix | Delete
if ( $hidden.length ) {
[4639] Fix | Delete
$hidden.show().find( 'input' ).focus()
[4640] Fix | Delete
} else {
[4641] Fix | Delete
$('.search-container').hide()
[4642] Fix | Delete
}
[4643] Fix | Delete
},
[4644] Fix | Delete
[4645] Fix | Delete
filterFeedsByName: function ( e ) {
[4646] Fix | Delete
[4647] Fix | Delete
var feeds = this.model.get('feeds');
[4648] Fix | Delete
var changed = this.model.get('feeds_changed');
[4649] Fix | Delete
var feedsArr;
[4650] Fix | Delete
var $t = $(e.target);
[4651] Fix | Delete
[4652] Fix | Delete
var val = $t.val();
[4653] Fix | Delete
[4654] Fix | Delete
if ( val && val.length > 2 ) {
[4655] Fix | Delete
// feedsArr = Object.keys( feeds );
[4656] Fix | Delete
this.renderFeedsList( changed, this.showErrorFeedsOnly, val );
[4657] Fix | Delete
this.$el.removeClass('jp-visible');
[4658] Fix | Delete
} else {
[4659] Fix | Delete
feedsArr = Object.keys( feeds );
[4660] Fix | Delete
this.renderFeedsList( changed, this.showErrorFeedsOnly );
[4661] Fix | Delete
if (feedsArr.length > 8) {
[4662] Fix | Delete
this.$el.addClass('jp-visible');
[4663] Fix | Delete
}
[4664] Fix | Delete
}
[4665] Fix | Delete
[4666] Fix | Delete
},
[4667] Fix | Delete
[4668] Fix | Delete
catchEnter: function( event ) {
[4669] Fix | Delete
[4670] Fix | Delete
var $t = $(event.target);
[4671] Fix | Delete
var $view = $t.closest('.feed-view');
[4672] Fix | Delete
[4673] Fix | Delete
if( event.keyCode == 13 && ! $view.is( '.filter-feed' ) ) {
[4674] Fix | Delete
$( event.target ).closest( '.networks-content' ).find( '.feed-popup-controls:visible .submit-button' ).click();
[4675] Fix | Delete
}
[4676] Fix | Delete
[4677] Fix | Delete
},
[4678] Fix | Delete
[4679] Fix | Delete
saveViaAjax: function ( e, dontSavePage ) {
[4680] Fix | Delete
[4681] Fix | Delete
if ( e ) e.stopImmediatePropagation();
[4682] Fix | Delete
[4683] Fix | Delete
var self = this;
[4684] Fix | Delete
var $t = $( e ? e.target : '' );
[4685] Fix | Delete
var model = this.model;
[4686] Fix | Delete
var isNew = model.isNew();
[4687] Fix | Delete
var uid;
[4688] Fix | Delete
var feeds = model.get( 'feeds' );
[4689] Fix | Delete
var changed = model.get( 'feeds_changed' );
[4690] Fix | Delete
var $enabled;
[4691] Fix | Delete
[4692] Fix | Delete
var id, state;
[4693] Fix | Delete
[4694] Fix | Delete
// validation in popup
[4695] Fix | Delete
if ( $t.is( '[id^=feed-sbmt]' ) ) {
[4696] Fix | Delete
if ( !this.validateFeedCfg( $t ) ) return;
[4697] Fix | Delete
}
[4698] Fix | Delete
[4699] Fix | Delete
// store page
[4700] Fix | Delete
if ( !dontSavePage ) this.currentPage = this.paginator._currentPageNum;
[4701] Fix | Delete
[4702] Fix | Delete
uid = this.$el.find('.feed-view-visible').data( 'uid' );
[4703] Fix | Delete
[4704] Fix | Delete
// catching and broadcasting event from toggler in list
[4705] Fix | Delete
// what's this????
[4706] Fix | Delete
if ( e && uid && feeds[uid] && feeds[uid]['enabled'] === 'nope' ) {
[4707] Fix | Delete
$enabled = this.$popup.find('[data-uid="' + uid + '"] > input:hidden');
[4708] Fix | Delete
$enabled.val( 'yep' ).change();
[4709] Fix | Delete
}
[4710] Fix | Delete
[4711] Fix | Delete
var saveFeedsRequest = this.model.save( isNew );
[4712] Fix | Delete
[4713] Fix | Delete
FlowFlow.makeOverlayTo( 'hide' );
[4714] Fix | Delete
[4715] Fix | Delete
// we don't wait for response to render UI
[4716] Fix | Delete
self.render();
[4717] Fix | Delete
[4718] Fix | Delete
saveFeedsRequest.done(
[4719] Fix | Delete
[4720] Fix | Delete
function ( response ) {
[4721] Fix | Delete
[4722] Fix | Delete
var feeds = model.get( 'feeds' ); // because model save rewrites feeds property
[4723] Fix | Delete
var changed = model.get( 'feeds_changed' );
[4724] Fix | Delete
var id;
[4725] Fix | Delete
[4726] Fix | Delete
for ( id in changed ) {
[4727] Fix | Delete
[4728] Fix | Delete
state = changed[ id ][ 'state' ];
[4729] Fix | Delete
[4730] Fix | Delete
if ( response.feeds && ! response.feeds[ id ] ) continue;
[4731] Fix | Delete
[4732] Fix | Delete
if ( state && state != 'deleted' ) {
[4733] Fix | Delete
[4734] Fix | Delete
if ( response.feeds[ id ][ 'status' ] == 2 ) {
[4735] Fix | Delete
[4736] Fix | Delete
if ( state === 'created' ) {
[4737] Fix | Delete
[4738] Fix | Delete
self.$el.find( '.feed-view-dynamic' ).removeClass( 'feed-view-dynamic' );
[4739] Fix | Delete
self.currentPage = 1;
[4740] Fix | Delete
self.startUpdateCycle( id );
[4741] Fix | Delete
[4742] Fix | Delete
}
[4743] Fix | Delete
else if ( state === 'changed' ) {
[4744] Fix | Delete
[4745] Fix | Delete
self.startUpdateCycle( id );
[4746] Fix | Delete
[4747] Fix | Delete
}
[4748] Fix | Delete
else if ( state === 'reset_cache' ) {
[4749] Fix | Delete
[4750] Fix | Delete
self.startUpdateCycle( id );
[4751] Fix | Delete
[4752] Fix | Delete
}
[4753] Fix | Delete
else if ( state === 'deleted' ) { // just delete
[4754] Fix | Delete
[4755] Fix | Delete
// delete specific feed from changes hash
[4756] Fix | Delete
delete changed[ id ];
[4757] Fix | Delete
}
[4758] Fix | Delete
[4759] Fix | Delete
} else { // success 1 or error 0
[4760] Fix | Delete
[4761] Fix | Delete
// delete specific feed from changed hash because its status resolved
[4762] Fix | Delete
delete changed[ id ];
[4763] Fix | Delete
[4764] Fix | Delete
// update feed in model for rendering
[4765] Fix | Delete
feeds[ id ] = response.feeds[ id ];
[4766] Fix | Delete
[4767] Fix | Delete
if ( response.feeds[ id ] [ 'status' ] != 1 ) {
[4768] Fix | Delete
console.log( 'feed status saveFeedsRequest', response.feeds[ id ] [ 'status' ] )
[4769] Fix | Delete
}
[4770] Fix | Delete
[4771] Fix | Delete
FlowFlow.showNotification( ( response.feeds[ id ] [ 'status' ] == 1 ? 'Yay' : 'Something went wrong' ) + '! Feed "<span>' + ( feeds[ id ].type === 'wordpress' ? ( feeds[ id ]['category-name'] || feeds[ id ]['wordpress-type'] ).toUpperCase() : feeds[ id ][ 'content' ] ).toUpperCase() + '</span>" ' + ( response.feeds[ id ] [ 'status' ] == 1 ? 'was successfully' : 'was' ) + ' ' + ( state == 'deleted' ? 'deleted' : ( state == 'created' ? 'created' : 'updated' ) ) + ( response.feeds[ id ] [ 'status' ] == 1 ? '' : ' with errors' ) + '<i class="flaticon-' + ( response.feeds[ id ] [ 'status' ] == 1 ? feeds[ id ][ 'type' ].toLowerCase() : 'error' ) + '"></i>' );
[4772] Fix | Delete
[4773] Fix | Delete
self.render();
[4774] Fix | Delete
[4775] Fix | Delete
FlowFlow.renderBoostsUI( self.model );
[4776] Fix | Delete
[4777] Fix | Delete
}
[4778] Fix | Delete
[4779] Fix | Delete
} else { // deleted feed
[4780] Fix | Delete
[4781] Fix | Delete
if ( changed [ id ]) {
[4782] Fix | Delete
FlowFlow.showNotification( 'Feed "<span>' + ( changed[ id ].type === 'wordpress' ? ( changed[ id ]['category-name'] || changed[ id ]['wordpress-type'] ).toUpperCase() : ( changed[ id ][ 'content' ] || '' )).toUpperCase() + '</span>"' + ' was successfully deleted<i class="flaticon-' + ( changed[ id ] && changed[ id ][ 'type' ] ? changed[ id ][ 'type' ].toLowerCase() + '"' : '' ) + '"></i>' );
[4783] Fix | Delete
}
[4784] Fix | Delete
[4785] Fix | Delete
// delete specific feed from changed hash because feed itself was deleted
[4786] Fix | Delete
delete feeds[ id ];
[4787] Fix | Delete
delete changed[ id ];
[4788] Fix | Delete
[4789] Fix | Delete
self.render();
[4790] Fix | Delete
[4791] Fix | Delete
}
[4792] Fix | Delete
[4793] Fix | Delete
[4794] Fix | Delete
}
[4795] Fix | Delete
[4796] Fix | Delete
})
[4797] Fix | Delete
.fail(
[4798] Fix | Delete
function ( res ) {
[4799] Fix | Delete
[4800] Fix | Delete
FlowFlow.showNotification( ( res && res.responseJSON && res.responseJSON.error ? res.responseJSON.error : 'Something went wrong. Please try again or ask support.<i class="flaticon-error">' ) );
[4801] Fix | Delete
[4802] Fix | Delete
self.render();
[4803] Fix | Delete
}
[4804] Fix | Delete
)
[4805] Fix | Delete
[4806] Fix | Delete
// notification banner
[4807] Fix | Delete
for ( id in changed ) {
[4808] Fix | Delete
[4809] Fix | Delete
state = changed[ id ][ 'state' ];
[4810] Fix | Delete
[4811] Fix | Delete
if ( state !== 'deleted' ) {
[4812] Fix | Delete
[4813] Fix | Delete
FlowFlow.showNotification( 'Getting data for "<span>' + ( feeds[ id ].type === 'wordpress' ? ( feeds[ id ]['category-name'] || feeds[ id ]['wordpress-type'] ) : feeds[ id ][ 'content' ] ).toUpperCase() + '</span>" in background, you\'ll be notified when resolved<i class="flaticon-' + feeds[ id ][ 'type' ].toLowerCase() + '"></i>' );
[4814] Fix | Delete
}
[4815] Fix | Delete
[4816] Fix | Delete
}
[4817] Fix | Delete
[4818] Fix | Delete
return saveFeedsRequest;
[4819] Fix | Delete
}
[4820] Fix | Delete
});
[4821] Fix | Delete
[4822] Fix | Delete
// expand/collapse section module
[4823] Fix | Delete
[4824] Fix | Delete
var sectionExpandCollapse = (function($) {
[4825] Fix | Delete
[4826] Fix | Delete
if (!window.Backbone) return {init: function(){}}
[4827] Fix | Delete
[4828] Fix | Delete
var storage = window.localStorage && JSON.parse(localStorage.getItem('ff_sections')) || {};
[4829] Fix | Delete
[4830] Fix | Delete
var SectionsModel = Backbone.Model.extend({
[4831] Fix | Delete
initialize: function() {
[4832] Fix | Delete
if (storage[this.id]) {
[4833] Fix | Delete
this.set('collapsed', storage[this.id]['collapsed']);
[4834] Fix | Delete
} else {
[4835] Fix | Delete
storage[this.id] = {collapsed: {}}
[4836] Fix | Delete
}
[4837] Fix | Delete
this.on('change', function(){
[4838] Fix | Delete
if (window.localStorage) {
[4839] Fix | Delete
storage[this.id]['collapsed'] = this.get('collapsed');
[4840] Fix | Delete
window.localStorage.setItem('ff_sections', JSON.stringify(storage))
[4841] Fix | Delete
}
[4842] Fix | Delete
})
[4843] Fix | Delete
},
[4844] Fix | Delete
defaults : function () {
[4845] Fix | Delete
return {
[4846] Fix | Delete
'collapsed' : {}
[4847] Fix | Delete
}
[4848] Fix | Delete
}
[4849] Fix | Delete
});
[4850] Fix | Delete
[4851] Fix | Delete
var SectionsView = Backbone.View.extend({
[4852] Fix | Delete
initialize: function() {
[4853] Fix | Delete
this.model.view = this;
[4854] Fix | Delete
this.$sections = this.$el.find('> .section');
[4855] Fix | Delete
this.render();
[4856] Fix | Delete
},
[4857] Fix | Delete
render: function(){
[4858] Fix | Delete
var self = this;
[4859] Fix | Delete
// add class if collapsed
[4860] Fix | Delete
self.$sections.each(function(){
[4861] Fix | Delete
var $t = $(this);
[4862] Fix | Delete
var index = self.$sections.index(this);
[4863] Fix | Delete
$t.append('<span class="section__toggle flaticon-arrow-down"></span>');
[4864] Fix | Delete
[4865] Fix | Delete
if (self.model.get('collapsed')[index]) $t.addClass('section--collapsed');
[4866] Fix | Delete
})
[4867] Fix | Delete
},
[4868] Fix | Delete
events: {
[4869] Fix | Delete
"click .section__toggle": "toggle"
[4870] Fix | Delete
},
[4871] Fix | Delete
toggle: function (e) {
[4872] Fix | Delete
console.log('Voi la!');
[4873] Fix | Delete
var $section = $(e.target).closest('.section');
[4874] Fix | Delete
var isCollapsed = $section.is('.section--collapsed');
[4875] Fix | Delete
var index = this.$sections.index($section);
[4876] Fix | Delete
var collapsed = _.clone(this.model.get('collapsed'));
[4877] Fix | Delete
[4878] Fix | Delete
if (isCollapsed) {
[4879] Fix | Delete
$section.removeClass('section--collapsed');
[4880] Fix | Delete
collapsed[index] = 0;
[4881] Fix | Delete
} else {
[4882] Fix | Delete
$section.addClass('section--collapsed');
[4883] Fix | Delete
collapsed[index] = 1;
[4884] Fix | Delete
}
[4885] Fix | Delete
this.model.set('collapsed', collapsed);
[4886] Fix | Delete
[4887] Fix | Delete
$(document).trigger('section-toggle', this.model.get('id'));
[4888] Fix | Delete
},
[4889] Fix | Delete
$sections: null
[4890] Fix | Delete
});
[4891] Fix | Delete
[4892] Fix | Delete
var globalDefaults = {
[4893] Fix | Delete
[4894] Fix | Delete
};
[4895] Fix | Delete
[4896] Fix | Delete
function init (opts) {
[4897] Fix | Delete
var settings = $.extend(globalDefaults, opts);
[4898] Fix | Delete
[4899] Fix | Delete
var model = new SectionsModel(settings);
[4900] Fix | Delete
var view = new SectionsView({model: model, el: settings.$element});
[4901] Fix | Delete
[4902] Fix | Delete
return view;
[4903] Fix | Delete
}
[4904] Fix | Delete
[4905] Fix | Delete
return {
[4906] Fix | Delete
init: init
[4907] Fix | Delete
};
[4908] Fix | Delete
})( jQuery )
[4909] Fix | Delete
[4910] Fix | Delete
// global shortcuts
[4911] Fix | Delete
window.sectionExpandCollapse = sectionExpandCollapse;
[4912] Fix | Delete
[4913] Fix | Delete
return {
[4914] Fix | Delete
'init' : function () {
[4915] Fix | Delete
var self = this;
[4916] Fix | Delete
var controller = FlowFlow.init.apply( FlowFlow, arguments);
[4917] Fix | Delete
[4918] Fix | Delete
self.init = function(){return self}
[4919] Fix | Delete
return self;
[4920] Fix | Delete
},
[4921] Fix | Delete
'FlowFlow' : FlowFlow,
[4922] Fix | Delete
'Model' : {
[4923] Fix | Delete
'StreamRow' : {
[4924] Fix | Delete
'collection' : streamRowModels,
[4925] Fix | Delete
'Class' : StreamRowModel
[4926] Fix | Delete
},
[4927] Fix | Delete
'Stream' : {
[4928] Fix | Delete
'collection' : streamModels,
[4929] Fix | Delete
'Class' : StreamModel
[4930] Fix | Delete
},
[4931] Fix | Delete
'Feeds' : {
[4932] Fix | Delete
'collection' : feedsModel,
[4933] Fix | Delete
'Class' : FeedsModel
[4934] Fix | Delete
}
[4935] Fix | Delete
},
[4936] Fix | Delete
'View' : {
[4937] Fix | Delete
'StreamRow' : {
[4938] Fix | Delete
'Class' : StreamRowView
[4939] Fix | Delete
},
[4940] Fix | Delete
'Stream' : {
[4941] Fix | Delete
'Class' : StreamView
[4942] Fix | Delete
},
[4943] Fix | Delete
'Feeds' : {
[4944] Fix | Delete
'view' : feedsView
[4945] Fix | Delete
}
[4946] Fix | Delete
},
[4947] Fix | Delete
sectionExpandCollapse : sectionExpandCollapse,
[4948] Fix | Delete
popup: FlowFlow.popup
[4949] Fix | Delete
}
[4950] Fix | Delete
})(jQuery)
[4951] Fix | Delete
[4952] Fix | Delete
jQuery(document).bind('html_ready', function(){
[4953] Fix | Delete
[4954] Fix | Delete
var app = FlowFlowApp.init();
[4955] Fix | Delete
[4956] Fix | Delete
// legacy, compatibility, todo change in add-on
[4957] Fix | Delete
window.confirmPopup = app.FlowFlow.popup;
[4958] Fix | Delete
});
[4959] Fix | Delete
[4960] Fix | Delete
function capitaliseFirstLetter (string)
[4961] Fix | Delete
{
[4962] Fix | Delete
return string ? string.charAt(0).toUpperCase() + string.slice(1) : '';
[4963] Fix | Delete
}
[4964] Fix | Delete
[4965] Fix | Delete
[4966] Fix | Delete
function stripslashes (str) {
[4967] Fix | Delete
if ( !str ) return;
[4968] Fix | Delete
str = str.replace(/\\'/g, '\'');
[4969] Fix | Delete
str = str.replace(/\\"/g, '"');
[4970] Fix | Delete
str = str.replace(/\\0/g, '\0');
[4971] Fix | Delete
str = str.replace(/\\\\/g, '\\');
[4972] Fix | Delete
return str;
[4973] Fix | Delete
}
[4974] Fix | Delete
[4975] Fix | Delete
function stripSlashesObjProps (obj) {
[4976] Fix | Delete
for (var prop in obj) {
[4977] Fix | Delete
if (typeof obj[prop] === 'string') obj[prop] = stripslashes(obj[prop]);
[4978] Fix | Delete
}
[4979] Fix | Delete
return obj
[4980] Fix | Delete
}
[4981] Fix | Delete
[4982] Fix | Delete
function getUrlVars() {
[4983] Fix | Delete
var vars = {};
[4984] Fix | Delete
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
[4985] Fix | Delete
vars[key] = value;
[4986] Fix | Delete
});
[4987] Fix | Delete
return vars;
[4988] Fix | Delete
}
[4989] Fix | Delete
It is recommended that you Edit text format, this type of Fix handles quite a lot in one request
Function