X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6746dc89c47ed01b165cc1152533605f97eb8e8d..f562e4c6e5fac7bcb445985b99acbea4d706e6f0:/docs/app/Favorites.js diff --git a/docs/app/Favorites.js b/docs/app/Favorites.js deleted file mode 100644 index 3a9e1081..00000000 --- a/docs/app/Favorites.js +++ /dev/null @@ -1,52 +0,0 @@ -/** - * Favorites management. - */ -Ext.define("Docs.Favorites", { - extend: 'Docs.LocalStore', - storeName: 'Favorites', - singleton: true, - - /** - * Associates Favorites with Docs TreePanel component. - * @param {Docs.view.tree.Tree} tree - */ - setTree: function(tree) { - this.tree = tree; - }, - - /** - * Adds class to favorites - * - * @param {String} cls the class to add - */ - add: function(cls) { - if (!this.has(cls)) { - this.store.add({cls: cls}); - this.syncStore(); - this.tree.setFavorite(cls, true); - } - }, - - /** - * Removes class from favorites. - * - * @param {String} cls the class to remove - */ - remove: function(cls) { - if (this.has(cls)) { - this.store.removeAt(this.store.findExact('cls', cls)); - this.syncStore(); - this.tree.setFavorite(cls, false); - } - }, - - /** - * Checks if class is in favorites - * - * @param {String} cls the classname to check - * @return {Boolean} true when class exists in favorites. - */ - has: function(cls) { - return this.store.findExact('cls', cls) > -1; - } -});