]> git.mxchange.org Git - quix0rs-gnu-social.git/commitdiff
Init notice_data-attach UI for form_notice
authorSarven Capadisli <csarven@controlyourself.ca>
Fri, 5 Jun 2009 04:00:04 +0000 (00:00 -0400)
committerSarven Capadisli <csarven@controlyourself.ca>
Fri, 5 Jun 2009 04:00:04 +0000 (00:00 -0400)
js/util.js
lib/noticeform.php
theme/base/css/display.css
theme/identica/css/display.css

index bffbf916fa0df6aa3d9c6f4886af5362dc2b5978..b712ba8e2be9bd24a8962d8b2dce2f933d52d5ea 100644 (file)
  */
 
 $(document).ready(function(){
-    $('input#notice_data-attach').toggle();
-    $('label[for=notice_data-attach]').text('Upload a file as an attachment?');
-    $('label[for=notice_data-attach]').click(function () {
-        if ('Upload a file as an attachment?' == $(this).text()) {
-            $(this).text('Upload: ');
-            $('input#notice_data-attach').slideDown('fast');
-        } else {
-            $('input#notice_data-attach').slideUp('fast', function() {$('label[for=notice_data-attach]').text('Upload a file as an attachment?');});
-        }
-    });
-
        // count character on keyup
        function counter(event){
                var maxLength = 140;
index 805cd56b131418ba599216c432bef4302bbd3514..5a6c7cf38c3ce96ee130f36a65d1e81a5cdcf1ef 100644 (file)
@@ -148,7 +148,6 @@ class NoticeForm extends Form
         $this->out->element('dd', array('id' => 'notice_text-count'),
                             '140');
         $this->out->elementEnd('dl');
-        $this->out->element('br', array('style' => 'clear:both'));
         $this->out->element('label', array('for' => 'notice_data-attach'), _('Attach'));
         $this->out->element('input', array('id' => 'notice_data-attach',
                                            'type' => 'file',
index 7d495c5395fadbb5604b5e365ba577098884e17e..7eea54eb2a42f103c2f2728df3584f23ffa86799 100644 (file)
@@ -452,6 +452,22 @@ float:left;
 font-size:1.3em;
 margin-bottom:7px;
 }
+#form_notice label[for=notice_data-attach] {
+text-indent:-9999px;
+display:block;
+}
+#form_notice label[for=notice_data-attach],
+#form_notice #notice_data-attach {
+position:absolute;
+top:25px;
+right:49px;
+width:16px;
+height:16px;
+cursor:pointer;
+}
+#form_notice #notice_data-attach {
+text-indent:-279px;
+}
 #form_notice #notice_submit label {
 display:none;
 }
index 1f1298737cd19430cc3393db22e8accfde5be3a6..8a03a4d7727d514d2449b0478e6c03c821a23302 100644 (file)
@@ -82,6 +82,13 @@ color:#333;
 #form_notice.warning #notice_text-count {
 color:#000;
 }
+#form_notice label[for=notice_data-attach] {
+background:transparent url(../../base/images/icons/twotone/green/clip-01.gif) no-repeat 0 45%;
+}
+#form_notice #notice_data-attach {
+opacity:0;
+}
+
 #form_notice.processing #notice_action-submit {
 background:#fff url(../../base/images/icons/icon_processing.gif) no-repeat 47% 47%;
 cursor:wait;