Browse Source

Fixing introduction text UI

Julio Montoya 11 years ago
parent
commit
fae4655df4
3 changed files with 17 additions and 244 deletions
  1. 6 238
      main/css/base.css
  2. 3 4
      main/inc/lib/display.lib.php
  3. 8 2
      main/inc/lib/formvalidator/FormValidator.class.php

+ 6 - 238
main/css/base.css

@@ -80,7 +80,13 @@ header #logo {
     margin-left: -13px;
     padding-left: 15px;
 }
+#introduction_block {
+    margin-top: 15px;
+}
 
+#introduction_block_action {
+    text-align: right;
+}
 /* button with image */
 button.add, button.save, button.cancel, button.refresh, button.upload, button.search, button.login, button.plus, button.minus, button.next, button.back {
     padding-left: 30px;
@@ -432,19 +438,6 @@ a.tag {
     font-size: 12px;
 }
 
-#smallcalendar .title {
-    background-color: #dcdcdc;
-    font-weight: bold;
-    padding: 5px;
-    color: #666;
-    text-align: center;
-    font-size: 11px;
-}
-
-#smallcalendar .title a {
-    color: #666;
-}
-
 #agenda_select {
     list-style: none;
     border: 0px solid green;
@@ -452,231 +445,6 @@ a.tag {
     padding: 0 0 0 10px;
 }
 
-/* ---------------------------------------------------
-    styles for the agenda (day, week, month view)
------------------------------------------------------*/
-#agenda_list {
-    width: 100%;
-    margin: 0 auto;
-    border: 1px solid #fff;
-    border-collapse: collapse;
-}
-
-/*The caption of the calendar (displays the month and the << and >> links*/
-#agenda_list .title {
-    background-color: #dcdcdc;
-    font-weight: bold;
-    font-size: 12px;
-    color: #666;
-    text-align: left;
-    padding: 2px 10px;
-    text-align: center;
-    border: 1px solid #bbb;
-}
-
-#agenda_list .title a:link, #agenda_list #title a:visited {
-    background-color: #dcdcdc;
-    font-weight: bold;
-    font-size: 11px;
-    color: #666;
-    padding: 2px 10px;
-    text-align: center;
-}
-
-#agenda_list .title a:hover {
-    background-color: #dcdcdc;
-    font-weight: bold;
-    font-size: 11px;
-    color: #f3840d;
-    padding: 2px 10px;
-    text-align: center;
-}
-
-/* The cells with the name of the days of the weeks (mon->sun)*/
-#agenda_list .weekdays, .data_table .weekdays {
-    background-color: #dcdcdc;
-    text-align: center;
-    font-weight: bold;
-    border: 1px solid #264269;
-    border-collapse: collapse;
-}
-
-/* The cells for the days (1->31) */
-#agenda_list .days_week {
-    height: 40px;
-    width: 12%;
-    text-align: left;
-    vertical-align: top;
-    border: 1px solid #ccc;
-    border-collapse: collapse;
-    background-color: #fff;
-}
-
-#agenda_list .days_week_selected {
-    height: 40px;
-    width: 12%;
-    text-align: left;
-    vertical-align: top;
-    border: 1px solid #ccc;
-    border-collapse: collapse;
-    background-color: #f5f5f5;
-}
-
-#agenda_list .days_weekend {
-    height: 40px;
-    width: 12%;
-    text-align: left;
-    vertical-align: top;
-    border: 1px solid #ccc;
-    border-collapse: collapse;
-    background-color: #e6e6e6;
-}
-
-#agenda_list .days_today {
-    height: 40px;
-    width: 12%;
-    text-align: left;
-    vertical-align: top;
-    border: 1px solid #ccc;
-    border-collapse: collapse;
-    background-color: #FFFFC0;
-}
-
-#agenda_list th {
-    background-color: #E5EDF9;
-    border: 1px solid gray;
-    padding-right: 12px;
-}
-
-/* text in the cells: display of agenda items (visible)*/
-#agenda_list .data {
-    background-color: #eee;
-    text-align: left;
-    padding: 2px 10px;
-    font-weight: bold;
-    border: 0px solid #dcdcdc;
-    border-collapse: collapse;
-}
-
-#agenda_list .datanotbold {
-    background-color: #eee;
-    text-align: left;
-    padding: 2px 10px;
-    font-weight: normal;
-    border: 0px solid #dcdcdc;
-    border-collapse: collapse;
-}
-
-#agenda_list .text {
-    background-color: #fff;
-    text-align: left;
-    padding: 2px 10px;
-    font-weight: normal;
-    border: 0px solid #dcdcdc;
-    border-collapse: collapse;
-}
-
-/*text in the cells: display of agenda items (invisible)*/
-#agenda_list .data_hidden {
-    background-color: #eee;
-    text-align: left;
-    padding: 2px 10px;
-    font-weight: bold;
-    border: 0px solid #dcdcdc;
-    border-collapse: collapse;
-    color: #999999;
-}
-
-#agenda_list .datanotbold_hidden {
-    background-color: #eee;
-    text-align: left;
-    padding: 2px 10px;
-    font-weight: normal;
-    border: 0px solid #dcdcdc;
-    border-collapse: collapse;
-    color: #999999;
-}
-
-#agenda_list .text_hidden {
-    background-color: #fff;
-    text-align: left;
-    padding: 2px 10px;
-    font-weight: normal;
-    border: 0px solid #dcdcdc;
-    border-collapse: collapse;
-    color: #999999;
-}
-
-/*text in the cells: display of agenda items (highlighted)*/
-#agenda_list .datanow {
-    background-color: #FFCC00;
-    text-align: left;
-    padding: 2px 10px;
-    font-weight: bold;
-    border: 0px solid #dcdcdc;
-    border-collapse: collapse;
-}
-
-#agenda_list .datanotboldnow {
-    background-color: #FFCC00;
-    text-align: left;
-    padding: 2px 10px;
-    font-weight: normal;
-    border: 0px solid #dcdcdc;
-    border-collapse: collapse;
-}
-
-#agenda_list .textnow {
-    background-color: #fff;
-    text-align: left;
-    padding: 2px 10px;
-    font-weight: normal;
-    border: 0px solid #dcdcdc;
-    border-collapse: collapse;
-}
-
-/* ---------------------------------------------------
-    styles for the mini agenda
------------------------------------------------------*/
-#smallcalendar {
-    width: 100%;
-    margin: 0 auto;
-    border: 1px solid #fff;
-    border-collapse: collapse;
-}
-
-#smallcalendar .weekdays {
-    background-color: #dcdcdc;
-    text-align: center;
-    font-size: 11px;
-    font-weight: bold;
-    border: 1px solid #fff;
-    border-collapse: collapse;
-}
-
-#smallcalendar .days_week {
-    background-color: #f5f5f5;
-    text-align: center;
-    font-size: 11px;
-    border-collapse: collapse;
-}
-
-#smallcalendar .days_weekend {
-    background-color: #e6e6e6;
-    text-align: center;
-    font-size: 11px;
-    border: 1px solid #fff;
-    border-collapse: collapse;
-}
-
-#smallcalendar .days_today {
-    width: 12%;
-    text-align: center;
-    font-size: 11px;
-    border: 1px solid #FA8500;
-    border-collapse: collapse;
-    background-color: #FFCA8D;
-}
 
 /* ---------------------------------------------------
     styles for the personal agenda

+ 3 - 4
main/inc/lib/display.lib.php

@@ -203,7 +203,7 @@ class Display
                 }
             }
 
-            $introduction_section .= '<div class="row"><div class="span12">';
+            $introduction_section .= '<div id="introduction_block" class="row"><div class="col-md-12">';
             $introduction_section .=  $thematic_description_html;
 
             if (!empty($intro_content)) {
@@ -214,9 +214,8 @@ class Display
             if ($intro_dispCommand) {
                 if (empty($intro_content)) {
                     // Displays "Add intro" commands
-                    $introduction_section .=  '<div id="courseintro_empty">';
+                    $introduction_section .=  '<div id="introduction_block_action" class="col-md-2 col-md-offset-10">';
 
-                    //$url = $app['url_generator']->generate('introduction_edit', array('tool' => $moduleId));
                     $url = api_get_path(WEB_PUBLIC_PATH).'introduction/edit/'.$tool;
                     $introduction_section .=  "<a href=\"".$url."?".api_get_cidreq()."\">";
                     $introduction_section .=  Display::return_icon('introduction_add.gif', get_lang('AddIntro')).' ';
@@ -226,7 +225,7 @@ class Display
 
                 } else {
                     // Displays "edit intro && delete intro" commands
-                    $introduction_section .=  '<div id="courseintro_empty">';
+                    $introduction_section .=  '<div id="introduction_block_action" class="col-md-2 col-md-offset-10">';
                     //$url = $app['url_generator']->generate('introduction_edit', array('tool' => $moduleId));
                     $url = api_get_path(WEB_PUBLIC_PATH).'introduction/edit/'.$tool;
 

+ 8 - 2
main/inc/lib/formvalidator/FormValidator.class.php

@@ -102,8 +102,14 @@ class FormValidator extends HTML_QuickForm
      * @param bool $track_submit (optional)		Whether to track if the form was
      * submitted by adding a special hidden field (default = true)
      */
-    public function __construct($form_name, $method = 'post', $action = '', $target = '', $attributes = null, $track_submit = true)
-    {
+    public function __construct(
+        $form_name,
+        $method = 'post',
+        $action = '',
+        $target = '',
+        $attributes = null,
+        $track_submit = true
+    ) {
         //Default form class
         if (is_array($attributes) && !isset($attributes['class']) || empty($attributes)) {
             $attributes['class'] = 'form-horizontal';