dhans / seed_module

No description has been added.

Clone this repository (size: 15.4 MB): HTTPS / SSH
$ hg clone http://bitbucket.org/dhans/seed_module/
commit 2570: 851640749319
parent 2569: 494a4fb98649
branch: default
Several Survey UI fixes. Fixes: Too narrow fieldsets in new question/option dialogs. Survey submit (on take view) and save/export/etc. buttons at weird places, instead of at bottom. Weird placement of radio buttons in Opera. Too narrow selects in IE. Broken images in edit view in IE and Opera. Reviewed by: Lennard de Rijk (Only on IE)
Daniel Diniz / ajaksu
9 months ago

Changed (Δ343 bytes):

raw changeset »

app/soc/content/css/soc-090418-ie.css (8 lines added, 0 lines removed)

app/soc/content/css/soc-090706.css (13 lines added, 13 lines removed)

app/soc/content/js/survey-edit-090706.js (5 lines added, 3 lines removed)

app/soc/content/js/survey-take-090706.js (0 lines added, 4 lines removed)

app/soc/templates/soc/survey/edit.html (10 lines added, 10 lines removed)

app/soc/templates/soc/survey/take.html (4 lines added, 4 lines removed)

app/soc/templates/soc/survey/universal_choice_editor.html (1 lines added, 1 lines removed)

Up to file-list app/soc/content/css/soc-090418-ie.css:

@@ -30,3 +30,11 @@ td.formfieldvalue select {
30
30
  width: 200px;
31
31
}
32
32
33
#survey_widget select,
34
#survey_widget input {
35
  width: auto !important;
36
}
37
38
#survey_widget textarea {
39
  width: 95%;
40
}

Up to file-list app/soc/content/css/soc-090706.css:

@@ -662,7 +662,7 @@ div #survey_widget.survey_admin {
662
662
}
663
663
664
664
div #survey_widget table {
665
  width:100%
665
  width:95%
666
666
}
667
667
668
668
div #survey_widget th,
@@ -674,7 +674,6 @@ div #survey_widget td {
674
674
675
675
div #survey_widget textarea.long_answer {
676
676
  padding: 10px;
677
  width: 500px;
678
677
}
679
678
680
679
div #survey_widget textarea.tooltip_entry {
@@ -682,8 +681,8 @@ div #survey_widget textarea.tooltip_entr
682
681
  width: 80%;
683
682
}
684
683
685
div #survey_widget input.text_question {
686
  width: 320px;
684
div #survey_widget textarea {
685
  width: 90% !important;
687
686
}
688
687
689
688
div #survey_widget td.formfieldlabel {
@@ -699,9 +698,6 @@ div #survey_widget td.formfieldlabel {
699
698
700
699
#survey_widget.quant_radio input,
701
700
#survey_widget.quant_radio label {
702
  clear: left;
703
  display: block;
704
  float: left;
705
701
  margin: 4px;
706
702
}
707
703
@@ -722,7 +718,7 @@ div #survey_widget a.delete {
722
718
}
723
719
724
720
div #survey_widget th label {
725
  display: block;
721
  /*display: block;*/
726
722
  max-width: 180px;
727
723
}
728
724
@@ -747,10 +743,8 @@ div #survey_widget fieldset {
747
743
  -webkit-border-radius: 5px;
748
744
}
749
745
750
div #survey_widget fieldset,
751
div #survey_widget th,
752
div #survey_widget td,
753
746
div #survey_widget select {
747
  display: inline;
754
748
}
755
749
756
750
div #survey_widget td {
@@ -768,13 +762,17 @@ div #survey_widget fieldset input {
768
762
}
769
763
770
764
div #survey_widget textarea.comment{
771
margin-bottom: 30px;
765
  margin-bottom: 30px;
772
766
}
773
767
774
768
div #survey_widget td > fieldset > label {
775
769
  font-size: 11px;
776
770
}
777
771
772
.ui-dialog-content {
773
  padding: 0px !important;
774
  margin: 5px !important;
775
}
778
776
779
777
#dialog {
780
778
  font-size: 62.5%;
@@ -825,8 +823,10 @@ div #survey_widget td > fieldset > label
825
823
  padding: .3em;
826
824
}
827
825
828
.pick_multi input {
826
.pick_multi input,
827
.quant_radio input {
829
828
  display: inline;
829
  width: auto !important;
830
830
}
831
831
832
832
/* NEWS FEED FEEDS */

Up to file-list app/soc/content/js/survey-edit-090706.js:

53
53
    */
54
54
55
55
    var SURVEY_PREFIX = 'survey__';
56
    var del_el = ["<a class='delete'><img '",
56
    var del_el = ["<a class='delete'><img ",
57
57
                  "src='/soc/content/images/minus.gif'/></a>"].join("");
58
58
    var del_li = ["<a class='delete_item' id='del_",
59
59
                  "' ><img src='/soc/content/images/minus.gif'/></a> "];
62
62
63
63
    function renderHTML() {
64
64
      // render existing survey forms
65
      widget.find('td > label').prepend(del_el).end();
65
      widget.find('td.twolineformfieldlabel > label').prepend(del_el).end();
66
66
67
67
      $('ol').find('li').each(
68
68
        function () {
487
487
      bgiframe: true,
488
488
      autoOpen: false,
489
489
      height: 300,
490
      width: 300,
490
491
      modal: true,
491
492
      buttons: {
492
493
        'Add option': function () {
533
534
  $(function () {
534
535
    //  Dialog for adding new question to survey
535
536
    var SURVEY_PREFIX = 'survey__';
536
    var del_el = ["<a class='delete'><img '",
537
    var del_el = ["<a class='delete'><img ",
537
538
              "src='/soc/content/images/minus.gif'/></a>"].join("");
538
539
    var del_li = ["<a class='delete_item' id='del_",
539
540
                  "' ><img src='/soc/content/images/minus.gif'/></a> "];
546
547
      bgiframe: true,
547
548
      autoOpen: false,
548
549
      height: 400,
550
      width: 300,
549
551
      modal: true,
550
552
      buttons: {
551
553
        'Add question': function () {

Up to file-list app/soc/content/js/survey-take-090706.js:

28
28
    */
29
29
30
30
    var widget = $('div#survey_widget');
31
    widget.parents('td.formfieldvalue:first').css({
32
      'float': 'left',
33
      'width': 200
34
    });
35
31
36
32
    // TODO(ajaksu) survey below is unused, remove if no known use is predicted
37
33
    var survey = widget.find('tbody:first');

Up to file-list app/soc/templates/soc/survey/edit.html:

@@ -51,7 +51,7 @@ Please use this form to edit the {{ enti
51
51
52
52
  <span class="formfieldlabel">Survey content:</span>
53
53
54
<div style="width:100%; float:left;">
54
<div style="width:100%;">
55
55
  <div class="survey_admin" id="survey_widget">
56
56
    <table>
57
57
      {% block survey_content %}
@@ -160,9 +160,9 @@ Please use this form to edit the {{ enti
160
160
161
161
<div id="new_item_dialog" title="Name new option">
162
162
  <form>
163
    <fieldset style="width: 50px;">
163
    <fieldset style="margin: 5px;">
164
164
165
      <label for="new_item_name">Name</label>
165
      <label for="new_item_name">Name</label><br>
166
166
      <input type="text" name="new_item_name" id="new_item_name"
167
167
       class="text ui-widget-content ui-corner-all" value="" />
168
168
@@ -172,21 +172,21 @@ Please use this form to edit the {{ enti
172
172
173
173
<div id="new_question_dialog" title="Name new question">
174
174
  <form>
175
    <fieldset style="width: 50px;">
175
    <fieldset style="margin: 5px;">
176
176
177
      <label for="new_question_name">ID (link_id-like)</label>
177
      <label for="new_question_name">ID (link_id-like)</label><br>
178
178
      <input type="text" name="new_question_name" id="new_question_name"
179
       class="text ui-widget-content ui-corner-all" value="" />
179
       class="text ui-widget-content ui-corner-all" value="" /><br>
180
180
181
      <label for="new_question_content">Title</label>
181
      <label for="new_question_content">Title</label><br>
182
182
      <input type="text" name="new_question_content" id="new_question_content"
183
       class="text ui-widget-content ui-corner-all" value="" />
183
       class="text ui-widget-content ui-corner-all" value="" /><br>
184
184
185
185
      <div id='question_options_div'>
186
        <label for="new_question_options">Options</label>
186
        <label for="new_question_options">Options</label><br>
187
187
        <textarea name="new_question_options"
188
188
         id="new_question_options" class="text ui-widget-content ui-corner-all"
189
         rows="7" cols="20"></textarea>
189
         rows="7" cols="20"></textarea><br>
190
190
      </div>
191
191
192
192
     </fieldset>

Up to file-list app/soc/templates/soc/survey/take.html:

@@ -44,7 +44,7 @@ limitations under the License.
44
44
  {% else %}
45
45
    <form method="post">
46
46
  {% endif %}
47
    <div style="width:100%; float:left; clear:right;">
47
    <div style="width:100%;">
48
48
      <div class="{{ status }}" id="survey_widget">
49
49
        <table>
50
50
          {% block form_table %}
@@ -54,13 +54,13 @@ limitations under the License.
54
54
      </div> {# end survey_widget #}
55
55
    </div>
56
56
57
<br/><br/>
58
    <div style="float:left">
57
<br><br>
58
    <div>
59
59
      <table>
60
60
        <tbody>
61
61
          <tr>
62
62
            <td>
63
              <input type="submit" value="Submit" style="font-weight: bold;"/>
63
              <input type="submit" value="Submit" style="font-weight: bold;">
64
64
            </td>
65
65
          </tr>
66
66
        </tbody>

Up to file-list app/soc/templates/soc/survey/universal_choice_editor.html:

46
46
 <tr>
47
47
  <td  colspan='2'>
48
48
    <textarea id="tip_for_{{ name }}" name="tip_for_{{ name }}"
49
     cols='20' rows='1' class="tooltip_entry">{{ tooltip_content }}</textarea>
49
     cols='20' rows='3' class="tooltip_entry">{{ tooltip_content }}</textarea>
50
50
  </td>
51
51
 </tr>
52
52
</table>