diff --git a/private/lib/gui/DatatablesHelper.php b/private/lib/gui/DatatablesHelper.php index 1de2867..c01b6dd 100644 --- a/private/lib/gui/DatatablesHelper.php +++ b/private/lib/gui/DatatablesHelper.php @@ -79,7 +79,7 @@ class DatatablesHelper { '}'. '});'; } - $buttonDiv.='
'; + $buttonDiv.='
'; } diff --git a/private/lib/gui/html.inclusion.php b/private/lib/gui/html.inclusion.php index 0d7d56d..7839c4b 100644 --- a/private/lib/gui/html.inclusion.php +++ b/private/lib/gui/html.inclusion.php @@ -30,4 +30,6 @@ GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_ADMIN, "chosen.jquery.min.js GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_ADMIN, "datatables.min.js"); GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_ADMIN, "init.js"); + +GUIHandler::addJavascriptLib(GUIHandler::JAVASCRIPT_ADMIN,"ckeditor/ckeditor.js"); ?> \ No newline at end of file diff --git a/public/admin/editNotizie.php b/public/admin/editNotizie.php new file mode 100644 index 0000000..954d716 --- /dev/null +++ b/public/admin/editNotizie.php @@ -0,0 +1,101 @@ +hasRole(AdminModel::ADMIN_TYPE_EDITORE_SUPERVISOR) && + !AdminLoginManager::getLogged()->hasRole(AdminModel::ADMIN_TYPE_EDITORE)){ + GUIHandler::redirect("admin/index.php"); +} + +$edit = false; +$notiziaId = PostHandler::get("id"); + +$notizia = new NotiziaModel(); +// var_dump($notizia); +if(!is_null($notiziaId)){ + $edit = true; + $notizia = GlobalVariables::get("dao")->getFirst("NotiziaModel",array("id"=>$notiziaId)); +// echo "pene"; +// var_dump($notizia); + if(is_null($notizia)){ + GUIHandler::redirect("admin/myNotizie.php"); + } + + if (!AdminLoginManager::getLogged()->hasRole(AdminModel::ADMIN_TYPE_EDITORE_SUPERVISOR) && + AdminLoginManager::getLogged()->hasRole(AdminModel::ADMIN_TYPE_EDITORE)){ + if(strcmp($notizia->about->owner, AdminLoginManager::getLogged()->id) != 0){ + GUIHandler::redirect("admin/myNotizie.php"); + } + } +} + +MenuGenerator::generateMenu(); +HTMLHelper::generateAdminHead(); + +if(!is_null(PostHandler::get("action")) && strcmp(PostHandler::get("action"), "")!=0){ + $save = PostHandler::get("action"); + if(strcmp($save, "save")==0){ + $saveable = new stdClass(); + + $saveable->id = PostHandler::get("id"); + $saveable->titolo = PostHandler::get("titolo"); + $saveable->sottotitolo = PostHandler::get("sottotitolo"); + $saveable->testo = PostHandler::get("testo"); + $mongoDate = new MongoDate(PostHandler::get("date")->getTimeStamp()); + $saveable->about->date = $mongoDate; + + if(!$edit){ + $saveable->about->author = AdminLoginManager::getLogged()->nome." ".AdminLoginManager::getLogged()->nome; + $saveable->about->owner = AdminLoginManager::getLogged()->id; + } + else{ + $saveable->about->author = PostHandler::get("nome")." ".PostHandler::get("cognome"); + $saveable->about->owner = PostHandler::get("owner"); + } + + GlobalVariables::get("dao")->save($saveable); + } +} + +?> +
+
+ + + + + +
+
Titolo: + +
+
Sottotitolo: + +
+
+ +
Data:
+ + +
+ + Submit +
+ + diff --git a/public/js/ckeditor/CHANGES.md b/public/js/ckeditor/CHANGES.md new file mode 100644 index 0000000..0e19149 --- /dev/null +++ b/public/js/ckeditor/CHANGES.md @@ -0,0 +1,1037 @@ +CKEditor 4 Changelog +==================== + +## CKEditor 4.5.6 + +New Features: + +* Introduced the [`CKEDITOR.tools.getCookie()`](http://docs.ckeditor.com/#!/api/CKEDITOR.tools-method-getCookie) and [`CKEDITOR.tools.setCookie()`](http://docs.ckeditor.com/#!/api/CKEDITOR.tools-method-setCookie) methods for accessing cookies. +* Introduced the [`CKEDITOR.tools.getCsrfToken()`](http://docs.ckeditor.com/#!/api/CKEDITOR.tools-method-getCsrfToken) method. The CSRF token is now automatically sent by the [File Browser](http://ckeditor.com/addon/filebrowser) and [File Tools](http://ckeditor.com/addon/filetools) plugins during file uploads. The server-side upload handlers may check it and use it to additionally secure the communication. + +Other Changes: + +* Updated [SCAYT](http://ckeditor.com/addon/scayt) (Spell Check As You Type): + - New features: + - CKEditor [Language](http://ckeditor.com/addon/language) plugin support. + - CKEditor [Placeholder](http://ckeditor.com/addon/placeholder) plugin support. + - [Drag&Drop](http://sdk.ckeditor.com/samples/fileupload.html) support. + - **Experimental** [GRAYT](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-grayt_autoStartup) (Grammar As You Type) functionality. + - Fixed issues: + * [#98](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/98): SCAYT affects dialog double-click. Fixed in SCAYT core. + * [#102](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/102): SCAYT core performance enhancements. + * [#104](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/104): SCAYT's spans leak into the clipboard and after pasting. + * [#105](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/105): A JavaScript error fired in case of multiple instances of CKEditor on one page. + * [#107](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/107): SCAYT should not check non-editable parts of content. + * [#108](https://github.com/WebSpellChecker/ckeditor-plugin-scayt/issues/108): Latest SCAYT copies the ID of the editor element to the iframe. + * SCAYT stops working when CKEditor [Undo plugin](http://ckeditor.com/addon/undo) not enabled. + * Issue with pasting SCAYT markup in CKEditor. + * SCAYT stops working after pressing the *Cancel* button in the WSC dialog. + +## CKEditor 4.5.5 + +Fixed Issues: + +* [#13887](https://dev.ckeditor.com/ticket/13887): Fixed: [Link](http://ckeditor.com/addon/link) plugin alters the `target` attribute value. Thanks to [SamZiemer](https://github.com/SamZiemer)! +* [#12189](http://dev.ckeditor.com/ticket/12189): Fixed: The [Link](http://ckeditor.com/addon/link) plugin dialog does not display the subject of email links if the subject parameter is not lowercase. +* [#9192](http://dev.ckeditor.com/ticket/9192): Fixed: An `undefined` string is appended to an email address added with the [Link](http://ckeditor.com/addon/link) plugin if subject and email body are empty and [`config.emailProtection`](http://docs.ckeditor.com/#!/api/CKEDITOR.config-cfg-emailProtection) is set to `encode`. +* [#13790](https://dev.ckeditor.com/ticket/13790): Fixed: It is not possible to destroy the editor `