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