openrat-cms

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit c5436f65b26f9c1a1fa1f579292fce84f029977b
parent 5b78169b12252e736c626b53c56bf2808ed9a615
Author: dankert <dankert@laptop-jan>
Date:   Mon, 11 Mar 2013 10:46:06 +0100

Beim Laden von Views und Dialogen die Id und die Action aus dem geƶffneten Editor beziehen.

Diffstat:
themes/default/js/openrat.js | 10+++++-----
themes/default/js/plugin/jquery-plugin-orLinkify.js | 4++--
2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/themes/default/js/openrat.js b/themes/default/js/openrat.js @@ -762,8 +762,8 @@ function postUrl(url,element) */ function startView( element,method ) { - var action = $(element).closest('div.panel').find('li.active').data('action'); - var id = $(element).closest('div.panel').find('li.active').data('id' ); + var action = $('#panel-content').find('li.active').data('action'); + var id = $('#panel-content').find('li.active').data('id' ); loadView( $(element).closest('div.panel').find('div.content'), action,method,id ); @@ -778,10 +778,10 @@ function startView( element,method ) * @param action Action * @param id Id */ -function startDialog( element,method,action,modal ) +function startDialog( method,modal ) { - var action = $(element).closest('div.panel').find('li.active').data('action'); - var id = $(element).closest('div.panel').find('li.active').data('id' ); + var action = $('#panel-content').find('li.active').data('action'); + var id = $('#panel-content').find('li.active').data('id' ); $('div#filler').fadeTo(500,0.5); //$('div#dialog').html('<div class="frame" data-action="'+action+'" data-method="'+method+'" data-id="'+id+'"><div class="window"><div class="content" /></div></div>'); diff --git a/themes/default/js/plugin/jquery-plugin-orLinkify.js b/themes/default/js/plugin/jquery-plugin-orLinkify.js @@ -23,12 +23,12 @@ jQuery.fn.orLinkify = function() else if ( type == 'modal' ) { - startDialog(this, $(this).attr('data-method'),$(this).attr('data-action'),true ); + startDialog($(this).attr('data-method'),true ); } else if ( type == 'dialog' ) { - startDialog(this, $(this).attr('data-method'),$(this).attr('data-action'),false ); + startDialog($(this).attr('data-method'),false ); } else if ( type == 'url' )