diff options
Diffstat (limited to 'sdnr/wt/devicemanager/provider/src/test/resources/elasticsearch/plugins/head/src/app/data/model/model.js')
-rw-r--r-- | sdnr/wt/devicemanager/provider/src/test/resources/elasticsearch/plugins/head/src/app/data/model/model.js | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/sdnr/wt/devicemanager/provider/src/test/resources/elasticsearch/plugins/head/src/app/data/model/model.js b/sdnr/wt/devicemanager/provider/src/test/resources/elasticsearch/plugins/head/src/app/data/model/model.js deleted file mode 100644 index a35e53b9b..000000000 --- a/sdnr/wt/devicemanager/provider/src/test/resources/elasticsearch/plugins/head/src/app/data/model/model.js +++ /dev/null @@ -1,35 +0,0 @@ -(function( $, app ) { - - var data = app.ns("data"); - var ux = app.ns("ux"); - - data.Model = ux.Observable.extend({ - defaults: { - data: null - }, - init: function() { - this.set( this.config.data ); - }, - set: function( key, value ) { - if( arguments.length === 1 ) { - this._data = $.extend( {}, key ); - } else { - key.split(".").reduce(function( ptr, prop, i, props) { - if(i === (props.length - 1) ) { - ptr[prop] = value; - } else { - if( !(prop in ptr) ) { - ptr[ prop ] = {}; - } - return ptr[prop]; - } - }, this._data ); - } - }, - get: function( key ) { - return key.split(".").reduce( function( ptr, prop ) { - return ( ptr && ( prop in ptr ) ) ? ptr[ prop ] : undefined; - }, this._data ); - }, - }); -})( this.jQuery, this.app ); |