// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project
// 
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$

// JS glue for jCapture feature

function openJCaptureDialog() {


	var $appletDiv = $("#jCaptureAppletDiv");
	if ($appletDiv.length) {
		$appletDiv.remove();
	}

	$appletDiv = $("<div id='jCaptureAppletDiv' style='width:1px;height:1px;visibility:hidden;'> </div>");
	$(document.body).append($appletDiv);

	$.get($.service('jcapture', 'capture'), {
			area: "none",
			page: "test"
	}, function(data){
		$appletDiv.html(data);
	});

//	} else {	TODO later
//		$appletDiv[0].showCaptureFrame();
//	}

}

function insertAtCarret( areaId, dokuTag ) {

	$("#jCaptureAppletDiv").hide();

	var tag = dokuTag.substring(3, dokuTag.length - 3);

	alert("file : " + tag);
	if (areaId) {
		insertAt( areaId, tag);
	}
}

// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project
// 
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$

// JS glue for jCapture feature

function openJCaptureDialog() {


	var $appletDiv = $("#jCaptureAppletDiv");
	if ($appletDiv.length) {
		$appletDiv.remove();
	}

	$appletDiv = $("<div id='jCaptureAppletDiv' style='width:1px;height:1px;visibility:hidden;'> </div>");
	$(document.body).append($appletDiv);

	$.get($.service('jcapture', 'capture'), {
			area: "none",
			page: "test"
	}, function(data){
		$appletDiv.html(data);
	});

//	} else {	TODO later
//		$appletDiv[0].showCaptureFrame();
//	}

}

function insertAtCarret( areaId, dokuTag ) {
	var tag = dokuTag.substring(3, dokuTag.length - 3);
	alert("file : " + tag);
	if (areaId) {
		insertAt( areaId, tag);
	}
}

--- 
+++ 
@@ -31,11 +31,7 @@
 }
 
 function insertAtCarret( areaId, dokuTag ) {
-
-	$("#jCaptureAppletDiv").hide();
-
 	var tag = dokuTag.substring(3, dokuTag.length - 3);
-
 	alert("file : " + tag);
 	if (areaId) {
 		insertAt( areaId, tag);
[FIX] jcapture: Add dependency on auth_token_access (service errors don't seem to appear though, sadly)

git-svn-id: a7fabbc6a7c54ea5c67cbd16bd322330fd10cc35@42069 b456876b-0849-0410-b77d-98878d47e9d5
