Палсеич— (lusever) wrote in changelog,
Палсеич—
lusever
changelog

[livejournal] r17937: LJSUP-7377: Wishlist.

Committer: pkornilov
LJSUP-7377: Wishlist.
LJSUP-7605: When you add the desire of the block displays an error.
LJSUP-7586: Need to implement an anchor for the add wish form.
LJSUP-7588: If you insert a URL picture without "http://" you can not see preview.
U   trunk/htdocs/js/jquery_fn.js
Modified: trunk/htdocs/js/jquery_fn.js
===================================================================
--- trunk/htdocs/js/jquery_fn.js	2010-12-15 07:14:27 UTC (rev 17936)
+++ trunk/htdocs/js/jquery_fn.js	2010-12-15 07:36:34 UTC (rev 17937)
@@ -143,9 +143,19 @@
 	} );
 }
 
-jQuery.fn.input = function(fn)
-{
-	return fn ? this.bind('input keyup paste', fn) : this.trigger('input');
+jQuery.fn.input = function(fn) {
+	return fn
+		? this.each(function() {
+			var last_value = this.value;
+			jQuery(this).bind("input keyup paste", function(e) {
+				// e.originalEvent use from trigger
+				if (!e.originalEvent || this.value !== last_value) {
+					last_value = this.value;
+					fn.apply(this, arguments);
+				}
+			})
+		})
+		: this.trigger("input");
 }
 
 /* function based on markup:
@@ -562,8 +572,21 @@
 			this.monthDate = new Date( selectedDay );
 			this.selectedDay = new Date( selectedDay );
 			view.initialize(this.monthDate, null, this.getSwitcherStates(this.monthDate));
+			this.switchMonth( 0 );
 
-			this.switchMonth( 0 );
+			/*
+			if( !options.onFetch ) {
+				view.initialize(this.monthDate, null, this.getSwitcherStates(this.monthDate));
+				this.switchMonth( 0 );
+			} else {
+				var self = this;
+				this.fetchEvents( function( events ) {
+					self.initEvents( events );
+					view.initialize(this.monthDate, null, this.getSwitcherStates(this.monthDate));
+					self.switchMonth( 0 );
+				} );
+			}
+			*/
 		}
 
 		this.switchMonth = function (go)
@@ -594,7 +617,7 @@
 			this.monthDate = date;
 
 			var self = this;
-			this.fetchMonthEvents( this.monthDate, function( events ) {
+			this.fetchMonthEvents( this.monthDate, function( events, date ) {
 				if( typeof events === "boolean" && events === false ) {
 				} else {
 					view.modelChanged(self.monthDate, self.selectedDay, events, self.getSwitcherStates( self.monthDate ) );
@@ -623,11 +646,6 @@
 			}
 		}
 
-		/*
-		
-		check
-		 */
-
 		this.getSwitcherStates = function (monthDate)
 		{
 			var prevMonth = new Date(monthDate);

Tags: js, livejournal, lusever
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