Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
alleditjs.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 /**
7  * Edition to affect document
8  *
9  * @author Anakeen 2011
10  */
11 
12 include_once ("FDL/viewdocjs.php");
13 /**
14  * All edit js scripts in one single file
15  * @param Action &$action current action
16  */
18 {
19  $jurl = "WHAT/Layout";
20 
21  $ckeditorPath = "lib/ckeditor/4";
22  if ($action->getParam("ISIE6") || $action->getParam("ISIE7")) {
23 
24  $ckeditorPath = "lib/ckeditor/3";
25  }
26 
27  $action->parent->addJsRef("$ckeditorPath/ckeditor.js");
28 
29  $extraCode = "";//sprintf("CKEDITOR_BASEPATH = '%s/';", $ckeditorPath);
30  $statics = array(
31  // "$ckeditorPath/ckeditor.js",
32  "$jurl/subwindow.js",
33  "$jurl/geometry.js",
34  "$jurl/AnchorPosition.js",
35  "$jurl/PopupWindow.js",
36  "$jurl/DHTMLapi.js",
37  "jscalendar/Layout/calendar.js",
38  "jscalendar/Layout/calendar-setup.js",
39  "FDL/Layout/common.js",
40  "FDL/Layout/iframe.js",
41  "FDL/Layout/autocompletion.js",
42  "FDC/Layout/inserthtml.js",
43  "FDL/Layout/popupdoc.js",
44  "FDL/Layout/popupdocmenu.js",
45  "$jurl/resizeimg.js",
46  "lib/jscolor/jscolor.js",
47  "lib/json2/json2.js"
48  );
49  if ($action->Read("navigator") == "EXPLORER") {
50  //$statics[]="$jurl/iehover.js";
51 
52  }
53  $lang = substr($action->GetParam("CORE_LANG") , 0, 2);
54  if (preg_match('#^[a-z0-9_\.-]+$#i', $lang) && file_exists("jscalendar/Layout/calendar-" . $lang . ".js")) {
55  $statics[] = "jscalendar/Layout/calendar-" . $lang . ".js";
56  } else {
57  $statics[] = "jscalendar/Layout/calendar-fr.js";
58  }
59 
60  $dynamics = array(
61  "FDL/Layout/editcommon.js",
62  "FDL/Layout/editload.js",
63  "FDL/Layout/enum_choice.js",
64  "FDL/Layout/viewdoc.js",
65  "FDL/Layout/edithtmltext.js"
66  );
67 
68  viewdocjs($action);
69  $action->lay->template = "";
70 
71  RessourcePacker::pack_js($action, $statics, $dynamics, $extraCode);
72 }
73 ?>
global $action
static pack_js(Action &$action, array &$static_js=array(), array &$dynamic_js=array(), $extraCode= '')
$lang
Definition: lang.php:18
viewdocjs(Action &$action)
Definition: viewdocjs.php:17
alleditjs(Action &$action)
Definition: alleditjs.php:17
Read($k, $d="")
getParam($name, $def="")
← centre documentaire © anakeen