Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
editutil.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Edition functions utilities
8  *
9  * @author Anakeen
10  * @version $Id: editutil.php,v 1.182 2009/01/14 12:33:31 eric Exp $
11  * @package FDL
12  * @subpackage
13  */
14 /**
15  */
16 //
17 // ---------------------------------------------------------------
18 include_once ("FDL/Class.Doc.php");
19 include_once ("FDL/Class.DocAttr.php");
20 include_once ("VAULT/Class.VaultFile.php");
21 /**
22  * Compose html code to insert input
23  * @param Doc &$doc document to edit
24  * @param NormalAttribute &$oattr attribute to edit
25  * @param string $value value of the attribute
26  * @param string $index in case of array : row of the array
27  * @param string $jsevent add an javascript callback on input (like onblur or onmouseover)
28  * @param string $notd not add cells in html input generated (by default inputs are in arrays)
29  */
30 function getHtmlInput(&$doc, &$oattr, $value, $index = "", $jsevent = "", $notd = false)
31 {
32  $form = new DocFormFormat($doc);
33  $form->useTd(!$notd);
34  $form->setJsEvents($jsevent);
35  return $form->getHtmlInput($oattr, $value, $index);
36 }
37 /**
38  * add different js files needed in edition mode
39  * @param Action $action
40  */
41 function editmode(Action & $action)
42 {
43  $action->parent->AddJsRef($action->GetParam("CORE_PUBURL") . "/lib/jquery/jquery.js");
44 
45  $ckeditorPath = "lib/ckeditor/4";
46  if ($action->getParam("ISIE6") || $action->getParam("ISIE7")) {
47  $ckeditorPath = "lib/ckeditor/3";
48  }
49  $action->parent->addJsRef("$ckeditorPath/ckeditor.js");
50  $action->parent->AddJsRef(sprintf("%sapp=FDL&action=ALLEDITJS&wv=%s", $action->GetParam("CORE_SSTANDURL") , $action->GetParam("WVERSION")));
51 
52  $action->parent->addJsRef("lib/tipsy/src/javascripts/jquery.tipsy.js");
53 
54 
55  $action->parent->addJsCode( sprintf("CKEDITOR_BASEPATH = '%s/';", $ckeditorPath));
56 
57  $action->parent->addCssRef("lib/tipsy/src/stylesheets/tipsy.css");
58  $action->parent->addCssRef("css/dcp/main.css");
59  $action->parent->addCssRef("css/dcp/document-edit.css");
60 }
61 ?>
global $action
getHtmlInput(&$doc, &$oattr, $value, $index="", $jsevent="", $notd=false)
Definition: editutil.php:30
getParam($name, $def="")
editmode(Action &$action)
Definition: editutil.php:41
$value
← centre documentaire © anakeen