Improving actions UI.

1.10.x
Julio Montoya 12 years ago
parent 3f786ee8d0
commit 2ffc47a1eb
  1. 2
      main/admin/course_list.php
  2. 15
      main/admin/user_list.php
  3. 84
      main/inc/lib/pear/HTML/QuickForm/text.php
  4. 4
      main/template/default/layout/footer.tpl
  5. 19
      web/ChamiloLMS/css/base.css

@ -249,13 +249,11 @@ if (isset ($_GET['search']) && $_GET['search'] == 'advanced') {
$form->addElement('style_submit_button', 'submit', get_lang('SearchCourse'), 'class="btn"'); $form->addElement('style_submit_button', 'submit', get_lang('SearchCourse'), 'class="btn"');
$form->addElement('static', 'search_advanced_link', null, '<a href="course_list.php?search=advanced">'.get_lang('AdvancedSearch').'</a>'); $form->addElement('static', 'search_advanced_link', null, '<a href="course_list.php?search=advanced">'.get_lang('AdvancedSearch').'</a>');
$actions .= '<div style="float: right; ">';
$actions .= '<a href="course_add.php">'.Display::return_icon('new_course.png', get_lang('AddCourse'),'',ICON_SIZE_MEDIUM).'</a> '; $actions .= '<a href="course_add.php">'.Display::return_icon('new_course.png', get_lang('AddCourse'),'',ICON_SIZE_MEDIUM).'</a> ';
if (api_get_setting('course_validation') == 'true') { if (api_get_setting('course_validation') == 'true') {
$actions .= '<a href="course_request_review.php">'.Display::return_icon('course_request_pending.png', get_lang('ReviewCourseRequests'),'',ICON_SIZE_MEDIUM).'</a>'; $actions .= '<a href="course_request_review.php">'.Display::return_icon('course_request_pending.png', get_lang('ReviewCourseRequests'),'',ICON_SIZE_MEDIUM).'</a>';
} }
$actions .= '</div>';
$actions .= $form->return_form(); $actions .= $form->return_form();
// Create a sortable table with the course data // Create a sortable table with the course data

@ -617,20 +617,19 @@ if (!empty($action)) {
// Create a search-box // Create a search-box
$form = new FormValidator('search_simple','get', '', '', array('class' => 'form-search'),false); $form = new FormValidator('search_simple','get', '', '', array('class' => 'form-search'),false);
$renderer =& $form->defaultRenderer(); /*$renderer =& $form->defaultRenderer();
$renderer->setElementTemplate('<span>{element}</span> '); $renderer->setElementTemplate('<span>{element}</span> ');*/
$form->addElement('text','keyword',get_lang('keyword'), 'size="25"'); $form->addElement('text', 'keyword', get_lang('keyword'));
$form->addElement('style_submit_button', 'submit',get_lang('Search'),'class="btn"'); $form->addElement('button', 'submit' ,get_lang('Search'));
$form->addElement('advanced_settings', 'user_list_filter', get_lang('AdvancedSearch')); $form->addElement('advanced_settings', 'user_list_filter', get_lang('AdvancedSearch'));
$actions = ''; $actions = '';
if (api_is_platform_admin()) { if (api_is_platform_admin()) {
$actions .= '<span style="float:right;">'. $actions .= '<a href="'.api_get_path(WEB_CODE_PATH).'admin/user_add.php">'.
'<a href="'.api_get_path(WEB_CODE_PATH).'admin/user_add.php">'. Display::return_icon('new_user.png',get_lang('AddUsers'),'',ICON_SIZE_MEDIUM).'</a>';
Display::return_icon('new_user.png',get_lang('AddUsers'),'',ICON_SIZE_MEDIUM).'</a>'.
'</span>';
} }
$actions .= $form->return_form(); $actions .= $form->return_form();
if (isset ($_GET['keyword'])) { if (isset ($_GET['keyword'])) {
$parameters = array ('keyword' => Security::remove_XSS($_GET['keyword'])); $parameters = array ('keyword' => Security::remove_XSS($_GET['keyword']));
} elseif (isset ($_GET['keyword_firstname'])) { } elseif (isset ($_GET['keyword_firstname'])) {

@ -1,41 +1,41 @@
<?php <?php
/* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */ /* vim: set expandtab tabstop=4 shiftwidth=4 softtabstop=4: */
/** /**
* HTML class for a text field * HTML class for a text field
* *
* PHP versions 4 and 5 * PHP versions 4 and 5
* *
* LICENSE: This source file is subject to version 3.01 of the PHP license * LICENSE: This source file is subject to version 3.01 of the PHP license
* that is available through the world-wide-web at the following URI: * that is available through the world-wide-web at the following URI:
* http://www.php.net/license/3_01.txt If you did not receive a copy of * http://www.php.net/license/3_01.txt If you did not receive a copy of
* the PHP License and are unable to obtain it through the web, please * the PHP License and are unable to obtain it through the web, please
* send a note to license@php.net so we can mail you a copy immediately. * send a note to license@php.net so we can mail you a copy immediately.
* *
* @category HTML * @category HTML
* @package HTML_QuickForm * @package HTML_QuickForm
* @author Adam Daniel <adaniel1@eesus.jnj.com> * @author Adam Daniel <adaniel1@eesus.jnj.com>
* @author Bertrand Mansion <bmansion@mamasam.com> * @author Bertrand Mansion <bmansion@mamasam.com>
* @copyright 2001-2009 The PHP Group * @copyright 2001-2009 The PHP Group
* @license http://www.php.net/license/3_01.txt PHP License 3.01 * @license http://www.php.net/license/3_01.txt PHP License 3.01
* @version CVS: $Id: text.php,v 1.7 2009/04/04 21:34:04 avb Exp $ * @version CVS: $Id: text.php,v 1.7 2009/04/04 21:34:04 avb Exp $
* @link http://pear.php.net/package/HTML_QuickForm * @link http://pear.php.net/package/HTML_QuickForm
*/ */
/** /**
* Base class for <input /> form elements * Base class for <input /> form elements
*/ */
require_once 'HTML/QuickForm/input.php'; require_once 'HTML/QuickForm/input.php';
/** /**
* HTML class for a text field * HTML class for a text field
* *
* @category HTML * @category HTML
* @package HTML_QuickForm * @package HTML_QuickForm
* @author Adam Daniel <adaniel1@eesus.jnj.com> * @author Adam Daniel <adaniel1@eesus.jnj.com>
* @author Bertrand Mansion <bmansion@mamasam.com> * @author Bertrand Mansion <bmansion@mamasam.com>
* @version Release: 3.2.11 * @version Release: 3.2.11
* @since 1.0 * @since 1.0
*/ */
class HTML_QuickForm_text extends HTML_QuickForm_input class HTML_QuickForm_text extends HTML_QuickForm_input
{ {
@ -53,8 +53,16 @@ class HTML_QuickForm_text extends HTML_QuickForm_input
* @access public * @access public
* @return void * @return void
*/ */
function HTML_QuickForm_text($elementName=null, $elementLabel=null, $attributes=null) function HTML_QuickForm_text($elementName = null, $elementLabel = null, $attributes = null)
{ {
if (isset($attributes) && is_array($attributes) && !empty($attributes['class'])) {
$attributes['class'] .= $attributes['class'].' form-control';
} else {
if (empty($attributes['class'])) {
$attributes = array('class' => 'form-control');
}
}
HTML_QuickForm_input::HTML_QuickForm_input($elementName, $elementLabel, $attributes); HTML_QuickForm_input::HTML_QuickForm_input($elementName, $elementLabel, $attributes);
$this->_persistantFreeze = true; $this->_persistantFreeze = true;
$this->setType('text'); $this->setType('text');
@ -89,10 +97,6 @@ class HTML_QuickForm_text extends HTML_QuickForm_input
*/ */
function setMaxlength($maxlength) function setMaxlength($maxlength)
{ {
$this->updateAttributes(array('maxlength'=>$maxlength)); $this->updateAttributes(array('maxlength' => $maxlength ));
} //end func setMaxlength }
}
// }}}
} //end class HTML_QuickForm_text
?>

@ -197,6 +197,10 @@ $(document).ready( function() {
interval: 10000 interval: 10000
}); });
$('.actions').addClass('btn-group');
$('.actions a').addClass('btn btn-default');
// Tooltip. // Tooltip.
$(function() { $(function() {
$('a').tooltip({ $('a').tooltip({

@ -199,14 +199,13 @@ footer .container .row {
} }
.actions { .actions {
min-height: 20px;
padding: 8px 15px;
margin-top: 10px; margin-top: 10px;
margin-bottom: 20px; margin-bottom: 10px;
background-color: #f5f5f5; }
border: 1px solid #e3e3e3;
border-radius: 4px; .actions form {
height: 50px; margin-left: 10px;
float:right;
} }
.actions .actions-pagination { .actions .actions-pagination {
@ -243,14 +242,10 @@ footer .container .row {
} }
.actions a { .actions a {
display: block;
float: left;
margin-right: 10px;
vertical-align: middle;
} }
.actions .btn-toolbar { .actions .btn-toolbar {
margin: 0px;
} }
#friend-container .thumbnail { #friend-container .thumbnail {

Loading…
Cancel
Save