can3p (can3p) wrote in changelog,
can3p
can3p
changelog

[livejournal] r20373: LJSUP-9826: Checkbox "Stick this post to...

Committer: dpetrov
LJSUP-9826: Checkbox "Stick this post to the top" should be disabled if user have not possibility to create sticky post
U   trunk/htdocs/js/entry.js
Modified: trunk/htdocs/js/entry.js
===================================================================
--- trunk/htdocs/js/entry.js	2011-10-18 22:06:01 UTC (rev 20372)
+++ trunk/htdocs/js/entry.js	2011-10-19 06:26:26 UTC (rev 20373)
@@ -69,6 +69,7 @@
 	var modifyDate = jQuery('#modifydate'),
 		stickyCheckbox = jQuery('#sticky_type'),
 		stickyLabel = jQuery('#sticky_type_label'),
+		stickyWrapper = jQuery('#entryform-sticky-wrapper'),
 		currentDateEdit = jQuery('#currentdate-edit');
 
 		journal = Site.remote_permissions[journal];
@@ -82,14 +83,14 @@
 		currentDateEdit.show();
 	}
 
-	stickyCheckbox.attr('disabled', !journal.can_create_sticky);
-	if (!journal.can_post_delayed) {
-		stickyCheckbox.attr('checked', false);
+	if (!journal.can_create_sticky) {
+		stickyWrapper.hide();
+	} else {
+		stickyLabel.html(journal.is_replace_sticky ? 
+				Site.ml_text['entryform.sticky_replace.edit'] :
+				Site.ml_text['entryform.sticky.edit']);
+		stickyWrapper.css('display','');
 	}
-	stickyLabel.html(journal.is_replace_sticky ? 
-			Site.ml_text['entryform.sticky_replace.edit'] :
-			Site.ml_text['entryform.sticky.edit']);
-
 }
 
 function showEntryTabs(){

Tags: can3p, dpetrov, 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