html5 editor
This commit is contained in:
parent
aa89a19d47
commit
31605002ca
|
@ -337,6 +337,7 @@ class UserController extends AppController {
|
|||
}
|
||||
if(!empty($page) and count($page)> 0){
|
||||
if($this->request->is('post')){
|
||||
var_dump($this->request);
|
||||
$this->request->data['DreamjobPageInh']['user_id']=$profil['AppUser']['id'];
|
||||
if($image){
|
||||
$this->request->data['DreamjobPageInh']['id']=$page['DreamjobPageInh']['id'];
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<?php
|
||||
echo $this->Html->charset();
|
||||
echo $this->Html->css(array('bootstrap.min','dreamjob'));
|
||||
echo $this->Html->css(array('bootstrap.min','bootstrap-wysihtml5','dreamjob'));
|
||||
echo $this->Html->meta('icon', $this->Html->url('/favicon.ico'));
|
||||
?>
|
||||
</head>
|
||||
|
@ -125,7 +125,7 @@
|
|||
</div>
|
||||
<!-- java script -->
|
||||
<?php
|
||||
echo $this->Html->script(array('jquery.min', 'bootstrap.min', 'jquery-ui', 'dreamjob'));
|
||||
echo $this->Html->script(array('jquery.min', 'bootstrap.min', 'jquery-ui','bootstrap-wysihtml5', 'dreamjob'));
|
||||
?>
|
||||
<!-- extraScript -->
|
||||
<?php
|
||||
|
|
|
@ -22,11 +22,11 @@
|
|||
$(where+' img').each(function(){ $(this).attr('src',$(this).attr('src')+ '?' + (new Date()).getTime()); });
|
||||
|
||||
$("#alert .alert").alert();
|
||||
|
||||
$(where+'.dropdown-toggle').dropdown();
|
||||
$(where+' textarea').wysihtml5();
|
||||
$(where+' .dropdown-toggle').dropdown();
|
||||
|
||||
$(where+" a").each(function(that){
|
||||
if($(this).attr("rel")!=="external" && $(this).attr("ref")!=="eventOff")
|
||||
if($(this).attr("rel")!=="external" && $(this).attr("ref")!=="eventOff" && !$(this).parents('ul').hasClass("wysihtml5-toolbar"))
|
||||
$(this).click(function(e){
|
||||
load($(this).attr('href'),{},($(this).attr('rel')=="tab"));
|
||||
return false;
|
||||
|
@ -35,6 +35,7 @@
|
|||
|
||||
$(where+" form").submit(function(e){
|
||||
if(!$(this).hasClass("hide-form") && $(this).attr('enctype')!='multipart/form-data' ){
|
||||
$(":input[ name *= '_wysihtml5_mod' ]",this).remove();
|
||||
e.stopPropagation();
|
||||
//e.preventDefault();
|
||||
if($(this).attr("back"))
|
||||
|
@ -50,6 +51,7 @@
|
|||
if (!$('#fileUpload').length)
|
||||
$('body').append('<iframe id="fileUpload" name="fileUpload" style="display:none" />');
|
||||
$(this).attr('target','fileUpload');
|
||||
$(":input[ name *= '_wysihtml5_mod' ]",this).remove();
|
||||
$(this).submit(function(){
|
||||
frame = $('#fileUpload').load(function(){
|
||||
setContent(frame.contents().find('body').html());
|
||||
|
@ -111,6 +113,7 @@
|
|||
evet();
|
||||
function saveForm(){
|
||||
i = 0;
|
||||
$(":input[ name *= '_wysihtml5_mod' ]",$(that).parents('form')).remove();
|
||||
$("tbody tr.new",$(that).parents('form')).remove();
|
||||
$("tbody tr",$(that).parents('form')).each(function(){
|
||||
$(":input",this).each(function(){
|
||||
|
|
Loading…
Reference in New Issue