Use span class="badge" for notes.

This commit is contained in:
Laurent Destailleur 2014-10-19 19:57:42 +02:00
parent 9b24cccd0b
commit 3fe4c58e95
18 changed files with 111 additions and 33 deletions

View File

@ -194,7 +194,7 @@ class Form
{
$ret.='<td align="left">';
$ret.='<input type="submit" class="button" name="modify" value="'.$langs->trans("Modify").'">';
//$ret.='<br>'."\n";
if (preg_match('/ckeditor|textarea/',$typeofdata)) $ret.='<br>'."\n";
$ret.='<input type="submit" class="button" name="cancel" value="'.$langs->trans("Cancel").'">';
$ret.='</td>';
}

View File

@ -155,7 +155,7 @@ class MobileDetect
'Asus' => 'Asus.*Galaxy|PadFone.*Mobile',
// @ref: http://www.micromaxinfo.com/mobiles/smartphones
// Added because the codes might conflict with Acer Tablets.
'Micromax' => 'Micromax.*\b(A\d+)\b',
'Micromax' => 'Micromax.*\bA\d+\b',
'Palm' => 'PalmSource|Palm', // avantgo|blazer|elaine|hiptop|plucker|xiino ; @todo - complete the regex.
'Vertu' => 'Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature', // Just for fun ;)
// @ref: http://www.pantech.co.kr/en/prod/prodList.do?gbrand=VEGA (PANTECH)
@ -179,7 +179,7 @@ class MobileDetect
protected static $tabletDevices = array(
'iPad' => 'iPad|iPad.*Mobile', // @todo: check for mobile friendly emails topic.
'NexusTablet' => 'Android.*Nexus[\s]+(7|10)|^.*Android.*Nexus(?:(?!Mobile).)*$',
'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P\d+|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-N8000|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-N8010|GT-N8005|GT-N8020|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-I9205|SM-T\d+|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-P6000|SM-T3100|SGH-I467|XE500|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|XE500T1C|SM-P605V|SM-P905V|SM-P600X|SM-P900X|', // SCH-P709|SCH-P729|SM-T2558 - Samsung Mega - treat them like a regular phone.
'SamsungTablet' => 'SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P\d+|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-N8000|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-N8010|GT-N8005|GT-N8020|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-I9205|SM-T\d+|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-P6000|SM-T3100|SGH-I467|XE500|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|XE500T1C|SM-P605V|SM-P905V|SM-P600X|SM-P900X', // SCH-P709|SCH-P729|SM-T2558 - Samsung Mega - treat them like a regular phone.
// @reference: http://www.labnol.org/software/kindle-user-agent-string/20378/
'Kindle' => 'Kindle|Silk.*Accelerated|Android.*\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE)\b',
// Only the Surface tablets with Windows RT are considered mobile.

View File

@ -131,7 +131,7 @@ function societe_prepare_head($object)
$head[$h][0] = DOL_URL_ROOT.'/societe/notify/card.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Notifications");
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
$head[$h][2] = 'notify';
$h++;
}
@ -142,7 +142,7 @@ function societe_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/societe/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Note");
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
$head[$h][2] = 'note';
$h++;
@ -152,7 +152,7 @@ function societe_prepare_head($object)
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
$head[$h][0] = DOL_URL_ROOT.'/societe/document.php?socid='.$object->id;
$head[$h][1] = $langs->trans("Documents");
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
if($nbFiles > 0) $head[$h][1].= ' <span class="badge">'.$nbFiles.'</span>';
$head[$h][2] = 'document';
$h++;
}

View File

@ -60,7 +60,7 @@ function contract_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/contrat/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Notes");
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
$head[$h][2] = 'note';
$h++;
}
@ -70,7 +70,7 @@ function contract_prepare_head($object)
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
$head[$h][0] = DOL_URL_ROOT.'/contrat/document.php?id='.$object->id;
$head[$h][1] = $langs->trans("Documents");
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
if($nbFiles > 0) $head[$h][1].= ' <span class="badge">'.$nbFiles.'</span>';
$head[$h][2] = 'documents';
$h++;

View File

@ -72,7 +72,7 @@ function fichinter_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/fichinter/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes');
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
$head[$h][2] = 'note';
$h++;
}
@ -82,7 +82,7 @@ function fichinter_prepare_head($object)
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
$head[$h][0] = DOL_URL_ROOT.'/fichinter/document.php?id='.$object->id;
$head[$h][1] = $langs->trans("Documents");
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
if($nbFiles > 0) $head[$h][1].= ' <span class="badge">'.$nbFiles.'</span>';
$head[$h][2] = 'documents';
$h++;

View File

@ -63,7 +63,7 @@ function facturefourn_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/fourn/facture/note.php?facid='.$object->id;
$head[$h][1] = $langs->trans('Notes');
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
$head[$h][2] = 'note';
$h++;
}
@ -73,7 +73,7 @@ function facturefourn_prepare_head($object)
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
$head[$h][0] = DOL_URL_ROOT.'/fourn/facture/document.php?facid='.$object->id;
$head[$h][1] = $langs->trans('Documents');
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
if($nbFiles > 0) $head[$h][1].= ' <span class="badge">'.$nbFiles.'</span>';
$head[$h][2] = 'documents';
$h++;
@ -135,7 +135,7 @@ function ordersupplier_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/fourn/commande/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Notes");
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
$head[$h][2] = 'note';
$h++;
}
@ -145,7 +145,7 @@ function ordersupplier_prepare_head($object)
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
$head[$h][0] = DOL_URL_ROOT.'/fourn/commande/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
if($nbFiles > 0) $head[$h][1].= ' <span class="badge">'.$nbFiles.'</span>';
$head[$h][2] = 'documents';
$h++;

View File

@ -79,7 +79,7 @@ function facture_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/compta/facture/note.php?facid='.$object->id;
$head[$h][1] = $langs->trans('Notes');
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
if ($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
$head[$h][2] = 'note';
$h++;
}

View File

@ -88,7 +88,7 @@ function member_prepare_head($object)
$head[$h][0] = DOL_URL_ROOT.'/adherents/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Note");
$head[$h][2] = 'note';
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
$h++;
$head[$h][0] = DOL_URL_ROOT.'/adherents/document.php?id='.$object->id;
@ -174,7 +174,7 @@ function member_stats_prepare_head($object)
$head[$h][1] = $langs->trans("Country");
$head[$h][2] = 'statscountry';
$h++;
$head[$h][0] = DOL_URL_ROOT.'/adherents/stats/geo.php?mode=memberbyregion';
$head[$h][1] = $langs->trans("Region");
$head[$h][2] = 'statsregion';

View File

@ -89,7 +89,7 @@ function commande_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/commande/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes');
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
$head[$h][2] = 'note';
$h++;
}
@ -99,7 +99,7 @@ function commande_prepare_head($object)
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
$head[$h][0] = DOL_URL_ROOT.'/commande/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
if($nbFiles > 0) $head[$h][1].= ' <span class="badge">'.$nbFiles.'</span>';
$head[$h][2] = 'documents';
$h++;

View File

@ -71,7 +71,7 @@ function project_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/projet/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes');
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
$head[$h][2] = 'notes';
$h++;
}
@ -81,7 +81,7 @@ function project_prepare_head($object)
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
$head[$h][0] = DOL_URL_ROOT.'/projet/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
if($nbFiles > 0) $head[$h][1].= ' <span class="badge">'.$nbFiles.'</span>';
$head[$h][2] = 'document';
$h++;
@ -149,7 +149,7 @@ function task_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/projet/tasks/note.php?id='.$object->id.(GETPOST('withproject')?'&withproject=1':'');;
$head[$h][1] = $langs->trans('Notes');
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
$head[$h][2] = 'task_notes';
$h++;
}
@ -458,7 +458,7 @@ function projectLinesb(&$inc, $parent, $lines, &$level, &$projectsrole, &$tasksr
global $db, $user, $bc, $langs;
global $form, $formother, $projectstatic, $taskstatic;
if (! is_object($formother))
if (! is_object($formother))
{
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php';
$formother = new FormOther($db);

View File

@ -83,7 +83,7 @@ function propal_prepare_head($object)
if(!empty($object->note_public)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/note.php?id='.$object->id;
$head[$h][1] = $langs->trans('Notes');
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
$head[$h][2] = 'note';
$h++;
}
@ -93,7 +93,7 @@ function propal_prepare_head($object)
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
$head[$h][0] = DOL_URL_ROOT.'/comm/propal/document.php?id='.$object->id;
$head[$h][1] = $langs->trans('Documents');
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
if($nbFiles > 0) $head[$h][1].= ' <span class="badge">'.$nbFiles.'</span>';
$head[$h][2] = 'document';
$h++;

View File

@ -101,7 +101,7 @@ function user_prepare_head($object)
if(!empty($object->note)) $nbNote++;
$head[$h][0] = DOL_URL_ROOT.'/user/note.php?id='.$object->id;
$head[$h][1] = $langs->trans("Note");
if($nbNote > 0) $head[$h][1].= ' ('.$nbNote.')';
if ($nbNote > 0) $head[$h][1].= ' <span class="badge">'.$nbNote.'</span>';
$head[$h][2] = 'note';
$h++;
@ -111,7 +111,7 @@ function user_prepare_head($object)
$nbFiles = count(dol_dir_list($upload_dir,'files',0,'','(\.meta|_preview\.png)$'));
$head[$h][0] = DOL_URL_ROOT.'/user/document.php?userid='.$object->id;
$head[$h][1] = $langs->trans("Documents");
if($nbFiles > 0) $head[$h][1].= ' ('.$nbFiles.')';
if($nbFiles > 0) $head[$h][1].= ' <span class="badge">'.$nbFiles.'</span>';
$head[$h][2] = 'document';
$h++;

View File

@ -214,6 +214,7 @@ if (isset($_SERVER["HTTP_USER_AGENT"]))
$conf->browser->layout=$tmp['layout'];
$conf->browser->phone=$tmp['phone']; // deprecated, use layout
$conf->browser->tablet=$tmp['tablet']; // deprecated, use layout
//var_dump($conf->browser);
}
@ -715,14 +716,14 @@ if (! GETPOST('nojs')) // If javascript was not disabled on URL
}
else $conf->use_javascript_ajax=0;
// Set terminal output option
// Set terminal output option according to conf->browser.
if (GETPOST('dol_hide_leftmenu') || ! empty($_SESSION['dol_hide_leftmenu'])) $conf->dol_hide_leftmenu=1;
if (GETPOST('dol_hide_topmenu') || ! empty($_SESSION['dol_hide_topmenu'])) $conf->dol_hide_topmenu=1;
if (GETPOST('dol_optimize_smallscreen') || ! empty($_SESSION['dol_optimize_smallscreen'])) $conf->dol_optimize_smallscreen=1;
if (GETPOST('dol_no_mouse_hover') || ! empty($_SESSION['dol_no_mouse_hover'])) $conf->dol_no_mouse_hover=1;
if (GETPOST('dol_use_jmobile') || ! empty($_SESSION['dol_use_jmobile'])) $conf->dol_use_jmobile=1;
if (! empty($conf->browser->phone)) $conf->dol_no_mouse_hover=1;
if (! empty($conf->browser->phone)
if (! empty($conf->browser->layout) && $conf->browser->layout != 'classic') $conf->dol_no_mouse_hover=1;
if ((! empty($conf->browser->layout) && $conf->browser->layout == 'phone')
|| (! empty($_SESSION['dol_screenwidth']) && $_SESSION['dol_screenwidth'] < 400)
|| (! empty($_SESSION['dol_screenheight']) && $_SESSION['dol_screenheight'] < 400)
)
@ -731,12 +732,13 @@ if (! empty($conf->browser->phone)
}
// If we force to use jmobile, then we reenable javascript
if (! empty($conf->dol_use_jmobile)) $conf->use_javascript_ajax=1;
// Disabled bugged themes
// Replace themes bugged with jmobile with eldy
if (! empty($conf->dol_use_jmobile) && in_array($conf->theme,array('bureau2crea','cameleo')))
{
$conf->theme='eldy';
$conf->css = "/theme/".$conf->theme."/style.css.php";
}
//var_dump($conf->browser->phone);
if (! defined('NOREQUIRETRAN'))
{

View File

@ -347,6 +347,20 @@ th .button {
/* ! Message d'erreur lors du login : */
center .error { padding:8px !important; padding-left:26px !important; padding-right:20px; width:inherit; max-width:450px;color:#552323 !important; font-size:14px; border-radius:8px; text-align: left;}
.badge {
display: inline-block;
min-width: 10px;
padding: 2px 5px;
font-size: 10px;
font-weight: 700;
line-height: 0.9em;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
background-color: #777;
border-radius: 10px;
}
/* ============================================================================== */

View File

@ -228,6 +228,21 @@ div.inline-block
.cursorpointer {
cursor: pointer;
}
.badge {
display: inline-block;
min-width: 10px;
padding: 2px 5px;
font-size: 10px;
font-weight: 700;
line-height: 0.9em;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
background-color: #777;
border-radius: 10px;
}
/* ============================================================================== */
/* Styles to hide objects */

View File

@ -253,6 +253,20 @@ div.inline-block
.cursorpointer {
cursor: pointer;
}
.badge {
display: inline-block;
min-width: 10px;
padding: 2px 5px;
font-size: 10px;
font-weight: 700;
line-height: 0.9em;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
background-color: #777;
border-radius: 10px;
}
/* ============================================================================== */

View File

@ -229,6 +229,20 @@ div.inline-block
.cursorpointer {
cursor: pointer;
}
.badge {
display: inline-block;
min-width: 10px;
padding: 2px 5px;
font-size: 10px;
font-weight: 700;
line-height: 0.9em;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
background-color: #777;
border-radius: 10px;
}
/* ============================================================================== */

View File

@ -223,6 +223,7 @@ body {
background-color: #FFFFFF;
<?php } else { ?>
background: <?php print $colorbackbody; ?>;
/* background-image: url("<?php print DOL_URL_ROOT.'/theme/eldy/img/background.png'; ?>"); */
<?php } ?>
color: #101010;
font-size: <?php print $fontsize ?>px;
@ -409,6 +410,21 @@ th .button {
.cursorpointer {
cursor: pointer;
}
.badge {
display: inline-block;
min-width: 10px;
padding: 2px 5px;
font-size: 10px;
font-weight: 700;
line-height: 0.9em;
color: #fff;
text-align: center;
white-space: nowrap;
vertical-align: baseline;
background-color: #777;
border-radius: 10px;
}
/* ============================================================================== */
/* Styles to hide objects */
@ -816,6 +832,9 @@ foreach($mainmenuusedarray as $val)
.bodylogin
{
background: #f0f0f0;
-moz-box-shadow: inset 0 0 10px #000000;
-webkit-box-shadow: inset 0 0 10px #000000;
box-shadow: inset 0 0 10px #000000;
}
.login_vertical_align {
padding: 10px;
@ -2962,9 +2981,9 @@ a.ui-link {
}
/* Warning: setting this may make screen not beeing refreshed after a combo selection */
.ui-body-c {
/*.ui-body-c {
background: #fff;
}
}*/
div.ui-radio, div.ui-checkbox
{