Максим Червонный (fiskus_boulder) wrote in changelog,
Максим Червонный
fiskus_boulder
changelog

[livejournal] r20617: LJSUP-10471: Moving buttons: Post / Prev...

Committer: mchervonniy
LJSUP-10471: Moving buttons: Post / Preview / Delete
U   trunk/cgi-bin/LJ/Widget/EntryForm.pm
U   trunk/htdocs/stc/entry.css
Modified: trunk/cgi-bin/LJ/Widget/EntryForm.pm
===================================================================
--- trunk/cgi-bin/LJ/Widget/EntryForm.pm	2011-11-23 14:25:18 UTC (rev 20616)
+++ trunk/cgi-bin/LJ/Widget/EntryForm.pm	2011-11-23 15:33:11 UTC (rev 20617)
@@ -1402,11 +1402,22 @@
 
     $out .= "<div id='submitbar' class='pkg'>\n\n";
     $out .= "<div id='security_container'>\n";
+
+    $out .= LJ::html_submit(
+        'action:delete',
+        BML::ml('entryform.delete'),
+        {
+            'disabled' => $opts->{'disabled_delete'},
+            'tabindex' => $self->tabindex,
+            'class' => "post-delete",
+            'onclick' => "return confirm('" .
+                LJ::ejs(BML::ml('entryform.delete.confirm')) . "')",
+        }
+    );
+
     $out .= "<div class='security-options'>\n";
     $out .= "<label for='security'>" . BML::ml('entryform.security2') . " </label>\n";
     
-    # preview button 
-    
     # extra submit button so make sure it posts the form when
     # person presses enter key
     my %action_map = (  'edit' => 'save',
@@ -1419,14 +1430,14 @@
         };
     }
     
+    # preview button 
     my $preview_tabindex = $self->tabindex;
     my $preview = qq{
-        <input
-        type="button"
-        value="$BML::ML{'entryform.preview'}"
-        onclick="entryPreview(this.form)"
+        <a class="post-preview"
         tabindex="$preview_tabindex"
-        />
+        href="javascript:entryPreview(this.form)">
+        $BML::ML{'entryform.preview'}
+        </a>
     };
 
     
@@ -1514,17 +1525,6 @@
             ) . "&nbsp;\n";
         }
 
-        $out .= LJ::html_submit(
-            'action:delete',
-            BML::ml('entryform.delete'),
-            {
-                'disabled' => $opts->{'disabled_delete'},
-                'tabindex' => $self->tabindex,
-                'onclick' => "return confirm('" .
-                    LJ::ejs(BML::ml('entryform.delete.confirm')) . "')",
-            }
-        ) . "&nbsp;\n";
-
         if (!$opts->{'disabled_spamdelete'}) {
             $out .= LJ::html_submit(
                 'action:deletespam',

Modified: trunk/htdocs/stc/entry.css
===================================================================
--- trunk/htdocs/stc/entry.css	2011-11-23 14:25:18 UTC (rev 20616)
+++ trunk/htdocs/stc/entry.css	2011-11-23 15:33:11 UTC (rev 20617)
@@ -613,12 +613,19 @@
 }
 #security_container {
 	overflow: hidden;
+	text-align: right;
 	}
-	#security_container .security-options {
-	    float: left;
+	#security_container .post-preview {
+		display: inline-block;
+		margin: 0 1em;
 		}
+	#security_container .post-delete {
+		float: left;
+		margin: 0 1em 0 0;
+		}
+	#security_container .security-options,
 	#security_container .submit-options {
-	    float: right;
+	    display: inline;
 		}
 #security {
     float: none !important;

Tags: css, fiskus_boulder, livejournal, mchervonniy, pm
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