Oracle (ex_ioracle) wrote in changelog,
Oracle
ex_ioracle
changelog

[livejournal] r20342: LJSUP-10152: Fix old-style interface of ...

Committer: skomarov
LJSUP-10152: Fix old-style interface of update.bml/editjournal.bml
U   trunk/cgi-bin/LJ/Widget/EntryForm.pm
U   trunk/htdocs/stc/entry.css
U   trunk/htdocs/update.bml
Modified: trunk/cgi-bin/LJ/Widget/EntryForm.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/EntryForm.pm	2011-10-17 11:39:38 UTC (rev 20341)
+++ trunk/cgi-bin/LJ/Widget/EntryForm.pm	2011-10-17 13:11:09 UTC (rev 20342)
@@ -419,7 +419,6 @@
     $out .= "<script>try { \$('journal_timezone').value = - (new Date).getTimezoneOffset()/0.6; } catch(e) {} </script>";
     $out .= "<div id='metainfo-wrap'><ul id='metainfo'>";
 
-
     my $can_edit_date = 1;
     # login info
     $out .= $opts->{'auth'};
@@ -533,26 +532,26 @@
     my $help_icon = LJ::help_icon("24hourshelp");
     my $hide_link = $can_edit_date ? '' : 'style="display: none;"'; 
 
-    if ( $opts->{'mode'} eq "edit" && $can_edit_date ) {
-        $out .= qq{ <li class='pkg' id='currentdate'><label class='title'>$BML::ML{'entryform.date'}</label>
-                <span class='wrap'>
-                    $monthlong, $mday, $year, $hour:$min
-                    <a $hide_link href='javascript:void(0)' onclick='editdate();' id='currentdate-edit'>$BML::ML{'entryform.date.edit'}</a>
-                    $help_icon
-                  </span>
-                </li> };
-    } else {
-        $out .= qq{ <li class='pkg' id='currentdate'><label class='title'>$BML::ML{'entryform.post'}</label>
-                <span class='wrap'>
-                    $BML::ML{'entryform.post.right.now'}
-                    <a $hide_link href='javascript:void(0)' onclick='editdate();' id='currentdate-edit'>$BML::ML{'entryform.date.edit'}</a>
-                    $help_icon
-                </span>
-            </li>};
-    }
+    if (LJ::is_enabled("delayed_entries")) {
+         if ( $opts->{'mode'} eq "edit" && $can_edit_date ) {
+             $out .= qq{ <li class='pkg' id='currentdate'><label class='title'>$BML::ML{'entryform.date'}</label>
+                    <span class='wrap'>
+                        $monthlong, $mday, $year, $hour:$min
+                        <a $hide_link href='javascript:void(0)' onclick='editdate();' id='currentdate-edit'>$BML::ML{'entryform.date.edit'}</a>
+                        $help_icon
+                    </span>
+                    </li> };
+        } else {
+            $out .= qq{ <li class='pkg' id='currentdate'><label class='title'>$BML::ML{'entryform.post'}</label>
+                    <span class='wrap'>
+                        $BML::ML{'entryform.post.right.now'}
+                        <a $hide_link href='javascript:void(0)' onclick='editdate();' id='currentdate-edit'>$BML::ML{'entryform.date.edit'}</a>
+                         $help_icon
+                     </span>
+                 </li>};
+        }
 
-    my $postpone_edit_text = LJ::is_enabled("delayed_entries") ? $BML::ML{'entryform.postponed.until'} : $BML::ML{'entryform.post.edit'};
-    $out .= qq{ <li class='pkg' id='modifydate' style='display: none;'><label class='title'>$postpone_edit_text</label>
+        $out .= qq{ <li class='pkg' id='modifydate' style='display: none;'><label class='title'>$BML::ML{'entryform.postponed.until'}</label>
                 <span class='wrap'>
                     <input type="hidden" name="date_ymd_mm" value="$mon" />
                     <input type="hidden" name="date_ymd_dd" value="$mday" />
@@ -572,8 +571,50 @@
             </p>
         </noscript>
         </li>
-    };
+        };
+    } else {
+        my $backdate_check = LJ::html_check({
+            'type' => "check",
+            'id' => "prop_opt_backdated",
+            'name' => "prop_opt_backdated",
+            "value" => 1,
+            'selected' => $opts->{'prop_opt_backdated'},
+            'tabindex' => $self->tabindex
+        });
 
+        my $backdate_help_icon = LJ::help_icon_html("backdate", "", "");
+
+        $out .= qq{
+            <li class='pkg'>
+                <label for='modifydate' class='title'>$BML::ML{'entryform.date'}</label>
+                <span class="wrap">
+                    <span id='currentdate'>
+                        <span id='currentdate-date'>
+                            $monthlong $mday, $year, $hour:$min
+                        </span>
+                        <a href='javascript:void(0)' onclick='editdate();' id='currentdate-edit'>$BML::ML{'entryform.date.edit'}</a>
+                    </span>
+                    <span id='modifydate'>
+                        $datetime
+                        <?de $BML::ML{'entryform.date.24hournote'} de?>
+                        <span class="backdate">
+                            $backdate_check
+                            <label for='prop_opt_backdated'>
+                                $BML::ML{'entryform.backdated3'}
+                            </label>
+                            $backdate_help_icon
+                        </span>
+                    </span>
+                </span>
+             </li>
+         <noscript>
+             <li id='time-correct' class='small'>
+                $BML::ML{'entryform.nojstime.note'}
+            </li>
+        </noscript>
+        };
+    }
+
     $$onload .= " defaultDate();";
 
     # User Picture
@@ -775,6 +816,7 @@
 
     my %blocks = (
         'sticky' => sub {
+            return '' unless LJ::is_enabled("delayed_entries");
             my $journalu = LJ::load_user($opts->{'usejournal'}) || $remote;
             my $is_checked = sub {
                 if ($opts->{sticky}) {
@@ -812,6 +854,7 @@
                 </label>};
         },
          'do_not_add' => sub {
+            return '' unless LJ::is_enabled("delayed_entries");
             my $selected = $opts->{'opt_backdated'} || 0;
             my $dot_add_check = LJ::html_check({
                 'type' => "check",

Modified: trunk/htdocs/stc/entry.css
===================================================================
--- trunk/htdocs/stc/entry.css	2011-10-17 11:39:38 UTC (rev 20341)
+++ trunk/htdocs/stc/entry.css	2011-10-17 13:11:09 UTC (rev 20342)
@@ -225,6 +225,21 @@
 				display: block;
 				padding-top: 5px;
 				}
+/* Remove when new version is coming */
+#updateForm #metainfo LI .backdate {
+	display: block;
+	clear: both;
+	padding-top: 3px;
+	} 
+#updateForm #metainfo LI .select,
+#updateForm #metainfo LI .text {
+	float: left;
+	margin-bottom: 2px;
+	}
+#updateForm #metainfo LI .de {
+	white-space: nowrap;
+	font-size: 11px;
+	}
 
 /* Options
 ----------------------------------------------- */
@@ -245,10 +260,6 @@
 		#updateForm #options LI .i-prop-selecttags {
 			margin-top: 3px;
 			}
-
-#currentdate {
-    display: none;
-}
 #currentdate-edit {
     font-size: 85%;
     margin-left: 5px;
@@ -505,15 +516,6 @@
 #prop_current_mood {
     width: 14%;
 }
-#prop_opt_backdated {
-    clear: left;
-    display: block;
-    float: left;
-    margin-left: 6.5em;
-}
-* html #prop_opt_backdated {
-    margin-left: 3em;
-}
 
 #prop_adult_content {
     width: 48%

Modified: trunk/htdocs/update.bml
===================================================================
--- trunk/htdocs/update.bml	2011-10-17 11:39:38 UTC (rev 20341)
+++ trunk/htdocs/update.bml	2011-10-17 13:11:09 UTC (rev 20342)
@@ -117,9 +117,12 @@
            if $tz;
     }
 
-    LJ::need_string(qw/
-                        entryform.sticky_replace.edit
-                        entryform.sticky.edit/);
+    if (LJ::is_enabled("delayed_entries")) {
+        LJ::need_string(qw/
+                          entryform.sticky_replace.edit
+                          entryform.sticky.edit
+                          entryform.choose_date/);
+    }
 
     my ($year, $mon, $mday, $hour, $min) = ($now->year,
                                             sprintf("%02d", $now->month),

Tags: bml, css, ioracle, livejournal, pm, skomarov
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