Fix: add jeditable css

This commit is contained in:
Regis Houssin 2012-02-06 17:44:37 +01:00
commit fd703d24b4
6 changed files with 19 additions and 21 deletions

View File

@ -1,10 +1,10 @@
<?php <?php
/* Copyright (c) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (c) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be> * Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org> * Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2011 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2005-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2006 Marc Barilley/Ocebo <marc@ocebo.com> * Copyright (C) 2006 Marc Barilley/Ocebo <marc@ocebo.com>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerker@telenet.be> * Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerker@telenet.be>
@ -87,7 +87,6 @@ class Form
if ($perm) if ($perm)
{ {
$tmp=explode(':',$typeofdata); $tmp=explode(':',$typeofdata);
if (preg_match('/^(string|email|numeric)$/i',$tmp[0])) $tmp[0] = 'text';
$ret.= '<div class="editkey_'.$tmp[0].'" id="'.$htmlname.'">'; $ret.= '<div class="editkey_'.$tmp[0].'" id="'.$htmlname.'">';
$ret.= $langs->trans($text); $ret.= $langs->trans($text);
$ret.= '</div>'."\n"; $ret.= '</div>'."\n";
@ -237,8 +236,7 @@ class Form
if (preg_match('/^(string|email|numeric)/',$inputType)) if (preg_match('/^(string|email|numeric)/',$inputType))
{ {
$tmp=explode(':',$inputType); $tmp=explode(':',$inputType);
$inputType='text'; $inputType=$tmp[0]; $inputOption=$tmp[1];
$inputOption=$tmp[1];
if (! empty($tmp[2])) $savemethod=$tmp[2]; if (! empty($tmp[2])) $savemethod=$tmp[2];
} }
if (preg_match('/^datepicker/',$inputType)) if (preg_match('/^datepicker/',$inputType))

View File

@ -107,7 +107,7 @@ $(document).ready(function() {
$( '#val_' + $(this).attr('id') ).click(); $( '#val_' + $(this).attr('id') ).click();
}); });
$('.editval_text').editable(urlSaveInPlace, { $('.editval_string').editable(urlSaveInPlace, {
type : 'text', type : 'text',
id : 'field', id : 'field',
width : 300, width : 300,
@ -118,7 +118,7 @@ $(document).ready(function() {
indicator : indicatorInPlace, indicator : indicatorInPlace,
submitdata : function(result, settings) { submitdata : function(result, settings) {
var htmlname = $(this).attr('id').substr(4); var htmlname = $(this).attr('id').substr(4);
return getParameters('text', htmlname); return getParameters('string', htmlname);
}, },
callback : function(result, settings) { callback : function(result, settings) {
var obj = $.parseJSON(result); var obj = $.parseJSON(result);
@ -131,7 +131,7 @@ $(document).ready(function() {
} }
} }
}); });
$('.editkey_text').hover( $('.editkey_string').hover(
function () { function () {
$( '#val_' + $(this).attr('id') ).addClass("editval_hover"); $( '#val_' + $(this).attr('id') ).addClass("editval_hover");
}, },
@ -139,7 +139,7 @@ $(document).ready(function() {
$( '#val_' + $(this).attr('id') ).removeClass("editval_hover"); $( '#val_' + $(this).attr('id') ).removeClass("editval_hover");
} }
); );
$('.editkey_text').click(function() { $('.editkey_string').click(function() {
$( '#val_' + $(this).attr('id') ).click(); $( '#val_' + $(this).attr('id') ).click();
}); });

View File

@ -1652,7 +1652,7 @@ table.cal_event td { border: 0px; padding-<?php print $left; ?>: 0px; padding-<?
/* jQuery - jeditable */ /* jQuery - jeditable */
/* ============================================================================== */ /* ============================================================================== */
.editkey_textarea, .editkey_ckeditor, .editkey_text, .editkey_numeric, .editkey_select { .editkey_textarea, .editkey_ckeditor, .editkey_string, .editkey_email, .editkey_numeric, .editkey_select {
background: url(<?php echo dol_buildpath($path.'/theme/auguria/img/edit.png',1) ?>) right top no-repeat; background: url(<?php echo dol_buildpath($path.'/theme/auguria/img/edit.png',1) ?>) right top no-repeat;
cursor: pointer; cursor: pointer;
} }
@ -1662,7 +1662,7 @@ table.cal_event td { border: 0px; padding-<?php print $left; ?>: 0px; padding-<?
cursor: pointer; cursor: pointer;
} }
.editval_textarea:hover, .editval_ckeditor:hover, .editval_text:hover, .editval_numeric:hover, .editval_select:hover, .editval_datepicker:hover { .editval_textarea:hover, .editval_ckeditor:hover, .editval_string:hover, .editval_email:hover, .editval_numeric:hover, .editval_select:hover, .editval_datepicker:hover {
background: white; background: white;
cursor: pointer; cursor: pointer;
} }

View File

@ -1844,7 +1844,7 @@ table.cal_event td { border: 0px; padding-<?php print $left; ?>: 0px; padding-<?
/* jQuery - jeditable */ /* jQuery - jeditable */
/* ============================================================================== */ /* ============================================================================== */
.editkey_textarea, .editkey_ckeditor, .editkey_text, .editkey_numeric, .editkey_select { .editkey_textarea, .editkey_ckeditor, .editkey_string, .editkey_email, .editkey_numeric, .editkey_select {
background: url(<?php echo dol_buildpath($path.'/theme/bureau2crea/img/edit.png',1) ?>) right top no-repeat; background: url(<?php echo dol_buildpath($path.'/theme/bureau2crea/img/edit.png',1) ?>) right top no-repeat;
cursor: pointer; cursor: pointer;
} }
@ -1854,7 +1854,7 @@ table.cal_event td { border: 0px; padding-<?php print $left; ?>: 0px; padding-<?
cursor: pointer; cursor: pointer;
} }
.editval_textarea:hover, .editval_ckeditor:hover, .editval_text:hover, .editval_numeric:hover, .editval_select:hover, .editval_datepicker:hover { .editval_textarea:hover, .editval_ckeditor:hover, .editval_string:hover, .editval_email:hover, .editval_numeric:hover, .editval_select:hover, .editval_datepicker:hover {
background: white; background: white;
cursor: pointer; cursor: pointer;
} }

View File

@ -1791,7 +1791,7 @@ table.cal_event td { border: 0px; padding-<?php print $left; ?>: 0px; padding-<?
/* jQuery - jeditable */ /* jQuery - jeditable */
/* ============================================================================== */ /* ============================================================================== */
.editkey_textarea, .editkey_ckeditor, .editkey_text, .editkey_numeric, .editkey_select { .editkey_textarea, .editkey_ckeditor, .editkey_string, .editkey_email, .editkey_numeric, .editkey_select {
background: url(<?php echo dol_buildpath($path.'/theme/cameleo/img/edit.png',1) ?>) right top no-repeat; background: url(<?php echo dol_buildpath($path.'/theme/cameleo/img/edit.png',1) ?>) right top no-repeat;
cursor: pointer; cursor: pointer;
} }
@ -1801,7 +1801,7 @@ table.cal_event td { border: 0px; padding-<?php print $left; ?>: 0px; padding-<?
cursor: pointer; cursor: pointer;
} }
.editval_textarea:hover, .editval_ckeditor:hover, .editval_text:hover, .editval_numeric:hover, .editval_select:hover, .editval_datepicker:hover { .editval_textarea:hover, .editval_ckeditor:hover, .editval_string:hover, .editval_email:hover, .editval_numeric:hover, .editval_select:hover, .editval_datepicker:hover {
background: white; background: white;
cursor: pointer; cursor: pointer;
} }

View File

@ -1,7 +1,7 @@
<?php <?php
/* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net> /* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2007-2011 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2007-2012 Regis Houssin <regis@dolibarr.fr>
* Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2011 Philippe Grand <philippe.grand@atoo-net.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -1959,7 +1959,7 @@ table.cal_event td { border: 0px; padding-<?php print $left; ?>: 0px; padding-<?
/* jQuery - jeditable */ /* jQuery - jeditable */
/* ============================================================================== */ /* ============================================================================== */
.editkey_textarea, .editkey_ckeditor, .editkey_text, .editkey_numeric, .editkey_select { .editkey_textarea, .editkey_ckeditor, .editkey_string, .editkey_email, .editkey_numeric, .editkey_select {
background: url(<?php echo dol_buildpath($path.'/theme/eldy/img/edit.png',1) ?>) right top no-repeat; background: url(<?php echo dol_buildpath($path.'/theme/eldy/img/edit.png',1) ?>) right top no-repeat;
cursor: pointer; cursor: pointer;
} }
@ -1969,7 +1969,7 @@ table.cal_event td { border: 0px; padding-<?php print $left; ?>: 0px; padding-<?
cursor: pointer; cursor: pointer;
} }
.editval_textarea:hover, .editval_ckeditor:hover, .editval_text:hover, .editval_numeric:hover, .editval_select:hover, .editval_datepicker:hover { .editval_textarea:hover, .editval_ckeditor:hover, .editval_string:hover, .editval_email:hover, .editval_numeric:hover, .editval_select:hover, .editval_datepicker:hover {
background: white; background: white;
cursor: pointer; cursor: pointer;
} }