armen_asriyan (armen_asriyan) wrote in changelog,
armen_asriyan
armen_asriyan
changelog

[livejournal] r22998: LJSUP-13768: JS for Journal Promo ban li...

Committer: aasriyan
LJSUP-13768: JS for Journal Promo ban list editor

U   trunk/htdocs/js/settings.js
Modified: trunk/htdocs/js/settings.js
===================================================================
--- trunk/htdocs/js/settings.js	2012-09-28 08:34:45 UTC (rev 22997)
+++ trunk/htdocs/js/settings.js	2012-09-28 08:42:47 UTC (rev 22998)
@@ -173,67 +173,3 @@
 LiveJournal.register_hook('page_load', function () {
 	LiveJournal.run_hook('init_settings', jQuery);
 });
-
-
-
-/**
- * @requires $.ui.core, $.ui.widget, $.lj.basicWidget
- * @class Toggle setting controls on checkbox change in my ads tab
- * @fileoverview journalpromo
- * @extends $.lj.basicWidget
- * @author armen.asriyan@sup.com (Armen Asriyan)
- */
-
-(function ($, window) {
-	'use strict';
-
-	/** @lends $.lj.journalpromo.prototype */
-	$.widget('lj.journalpromo', $.lj.basicWidget, {
-		options: {
-			classNames: {
-				settingsHidden: 'journalpromo-options-on'
-			},
-
-			selectors: {
-				checkbox: '#hidden-journalpromo-enable-input',
-				panel: '#hidden-journalpromo'
-			}
-		},
-
-		_create: function () {
-			$.lj.basicWidget.prototype._create.apply(this);
-			
-			this._el('checkbox');
-			this._el('panel');
-			
-			if ( this._checkbox.is(':checked') ) {
-				this.show();
-			}
-
-			this._bindControls();
-		},
-
-		_bindControls: function () {
-			$.lj.basicWidget.prototype._bindControls.apply(this);
-			
-			var that = this;
-			
-			this._checkbox.on('change', function() {
-				
-				that[ $(this).is(':checked') ? 'show' : 'hide' ]();
-			});
-		},
-		/**
-		 * Show settings panel
-		 */
-		show: function() {
-			this._panel.addClass( this._cl('settingsHidden') );
-		},
-		/**
-		 * Hide settings panel
-		 */
-		hide: function() {
-			this._panel.removeClass( this._cl('settingsHidden') );
-		}
-	});
-}(jQuery, window));

Tags: aasriyan, armen_asriyan, js, livejournal
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments