Willkommen bei WordPress. Dies ist dein erster Beitrag. Bearbeite oder lösche ihn und beginne mit dem Schreiben!
Hallo Welt!
von raredesign | Dez 3, 2019 | Allgemein | 0 Kommentare
Cokiee Shell
Current Path : /var/www/web28/html/wp-content/plugins/fusion-builder/inc/lib/inc/fusion-app/ |
Current File : //var/www/web28/html/wp-content/plugins/fusion-builder/inc/lib/inc/fusion-app/model-view-manager.js |
var FusionPageBuilder = FusionPageBuilder || {}; ( function() { FusionPageBuilder.ViewManager = Backbone.Model.extend( { defaults: { elementCount: 0, views: {} }, getViews: function() { return this.get( 'views' ); }, getView: function( cid ) { return this.get( 'views' )[ cid ]; }, getChildViews: function( parentID ) { var views = this.get( 'views' ), childViews = {}; _.each( views, function( view, key ) { if ( parentID === view.model.attributes.parent ) { childViews[ key ] = view; } } ); return childViews; }, generateCid: function() { var elementCount = this.get( 'elementCount' ) + 1; this.set( { elementCount: elementCount } ); return elementCount; }, addView: function( cid, view ) { var views = this.get( 'views' ); views[ cid ] = view; this.set( { views: views } ); }, removeView: function( cid ) { var views = this.get( 'views' ), updatedViews = {}; _.each( views, function( value, key ) { if ( key != cid ) { // jshint ignore: line updatedViews[ key ] = value; } } ); this.set( { views: updatedViews } ); }, removeViews: function() { var updatedViews = {}; this.set( { views: updatedViews } ); }, countElementsByType: function( elementType ) { var views = this.get( 'views' ), num = 0; _.each( views, function( view ) { if ( view.model.attributes.element_type === elementType ) { num++; } } ); return num; }, clear: function() { var views = this.get( 'views' ); _.each( views, function( view ) { view.unbind(); view.remove(); delete view.$el; delete view.el; } ); this.set( 'elementCount', 0 ); this.set( 'views', {} ); } } ); }( jQuery ) );
Cokiee Shell Web 1.0, Coded By Razor
Neueste Kommentare