Index: openacs-4/packages/xowiki/tcl/form-field-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/form-field-procs.tcl,v diff -u -r1.200 -r1.201 --- openacs-4/packages/xowiki/tcl/form-field-procs.tcl 13 Feb 2012 19:03:34 -0000 1.200 +++ openacs-4/packages/xowiki/tcl/form-field-procs.tcl 14 Feb 2012 10:15:44 -0000 1.201 @@ -1411,6 +1411,7 @@ # # mode: wysiwyg, source # skin: kama, v2, office2003 + # extraPlugins: tcl-list, is converted to comma list for js # ########################################################### Class richtext::ckeditor -superclass richtext -parameter { @@ -1498,8 +1499,7 @@ set id [my id] set name [my name] set package_id [[my object] package_id] - #my extraPlugins xowikiimage - my extraPlugins timestamp,xowikiimage + #my extraPlugins {timestamp xowikiimage} set options [subst { toolbar : '[my toolbar]', @@ -1509,24 +1509,31 @@ startupMode: '[my mode]', parent_id: '[[my object] item_id]', package_url: '[$package_id package_url]', - extraPlugins: '[my extraPlugins]', + extraPlugins: '[join [my extraPlugins] ,]', contentsCss: '[my contentsCss]', imageSelectorDialog: '[my imageSelectorDialog]', customConfig: '[my customConfig]' }] - if {[lsearch [split [my extraPlugins] ,] xowikiimage] > -1} { + if {[lsearch [my extraPlugins] xowikiimage] > -1} { my js_image_helper } - set callback [my callback] #set parent [[[my object] package_id] get_page_from_item_or_revision_id [[my object] parent_id]];# ??? if {[my set inplace]} { if {[my value] eq ""} {my value " "} my render_richtext_as_div - set wrapper_class [expr {[my inline] ? {} : {form-item-wrapper}}] + if {[my inline]} { + set wrapper_class "" + } else { + set wrapper_class "form-item-wrapper" + my callback {$(this.element.$).closest('.form-widget').css('clear','both').css('display', 'block');} + my destroy_callback {$(this).closest('.form-widget').css('clear','none');} + } + set callback [my callback] set destroy_callback [my destroy_callback] + ::xo::Page requireJS "/resources/xowiki/ckeip.js" ::xo::Page requireJS [subst -nocommands { \$(document).ready(function() { @@ -1541,6 +1548,7 @@ }); }] } else { + set callback [my callback] ::xo::Page requireJS [subst -nocommands { \$(document).ready(function() { \$( '#$id' ).ckeditor(function() { $callback }, { Index: openacs-4/packages/xowiki/www/ckeditor-images/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/ckeditor-images/index.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/ckeditor-images/index.tcl 13 Feb 2012 19:03:34 -0000 1.1 +++ openacs-4/packages/xowiki/www/ckeditor-images/index.tcl 14 Feb 2012 10:15:44 -0000 1.2 @@ -5,7 +5,7 @@ {bild_url ""} } set package_url [ad_conn package_url] -set image_browser_url [ad_conn url] +set image_browser_url $package_url/ckeditor-images set fs_package_id $parent_id set CKEditorFuncNum 0 set item_id $fs_package_id Index: openacs-4/packages/xowiki/www/ckeditor-images/thumb-view.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/ckeditor-images/thumb-view.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/ckeditor-images/thumb-view.adp 13 Feb 2012 19:03:35 -0000 1.1 +++ openacs-4/packages/xowiki/www/ckeditor-images/thumb-view.adp 14 Feb 2012 10:15:44 -0000 1.2 @@ -16,7 +16,7 @@ -
@sub_files.date@
Löschen +
@sub_files.date@
Löschen
Index: openacs-4/packages/xowiki/www/ckeditor-images/thumb-view.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/ckeditor-images/thumb-view.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/ckeditor-images/thumb-view.tcl 13 Feb 2012 19:03:35 -0000 1.1 +++ openacs-4/packages/xowiki/www/ckeditor-images/thumb-view.tcl 14 Feb 2012 10:15:44 -0000 1.2 @@ -1,17 +1,17 @@ ad_page_contract { } { - {parent_id ""} + {parent_id ""} } -validate { - parent_id_exists -requires {parent_id} { - if {[db_0or1row object_exists "select item_id from cr_items where item_id =:parent_id"] == 0} { - #ad_complain "Das angegebene Objekt existiert nicht." - } - } + parent_id_exists -requires {parent_id} { + if {[db_0or1row object_exists "select item_id from cr_items where item_id =:parent_id"] == 0} { + #ad_complain "Das angegebene Objekt existiert nicht." + } + } } set output "" -set return_url "[ns_urlencode "[ad_conn url]?parent_id=$parent_id"]" +set return_url [ns_urlencode "[ad_conn url]?parent_id=$parent_id"] db_multirow -extend url sub_files get_children " select package_id,name,cr.item_id ,revision_id,mime_type, to_char(publish_date, 'yyyy-mm-dd, HH:MM') as date from cr_items ci inner join cr_revisions cr on (ci.item_id = cr.item_id) @@ -22,10 +22,6 @@ ::xowiki::Package initialize -package_id $package_id set item [::xowiki::File get_instance_from_db -item_id $item_id] set url "[$item pretty_link]" - } - -#append output "$revision_id $mime_type $content
" -#set server_url [ad_url] set server_url "" Index: openacs-4/packages/xowiki/www/ckeditor-images/upload_image.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/ckeditor-images/upload_image.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/xowiki/www/ckeditor-images/upload_image.tcl 13 Feb 2012 19:03:35 -0000 1.1 +++ openacs-4/packages/xowiki/www/ckeditor-images/upload_image.tcl 14 Feb 2012 10:15:44 -0000 1.2 @@ -57,6 +57,6 @@ #ad_returnredirect "." ds_comment $revision_id set bild_url "[$file_object pretty_link]?m=download" - set image_browser_url [ad_conn url] + set image_browser_url [ad_conn package_url]/ckeditor-images set js_update "parent.frames\['thumbs'\].location='$image_browser_url/thumb-view?parent_id=${parent_id}';" }