From 9c456d3d049a35628783a9ba325750271545c6cf Mon Sep 17 00:00:00 2001 From: amin Date: Sat, 19 Mar 2016 15:20:22 +0330 Subject: [PATCH 1/8] Update composer.json --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4fabaace..aeada020 100644 --- a/composer.json +++ b/composer.json @@ -9,7 +9,8 @@ "tinymce", "upload", "file", - "manager" + "manager", + "image" ], "authors": [ { From 371e17c5eb9cb546cd605280eb73a520b2dbab0a Mon Sep 17 00:00:00 2001 From: Amin Mazrouei Date: Sat, 19 Mar 2016 15:53:49 +0330 Subject: [PATCH 2/8] fixed index view --- src/views/index.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/index.blade.php b/src/views/index.blade.php index 27e2386d..a9a110b7 100644 --- a/src/views/index.blade.php +++ b/src/views/index.blade.php @@ -150,7 +150,7 @@ ``` +### Option 3: Independent use + +If you are going to use filemanager independently,meaning set the value of an input to selected photo/file url,follow this structure: + +1. create a popup window or modal(whatever you like): + +```html + +``` + +```javascript + $('#feature-img-container').on('click', function(e) + { + + window.open(this.href, 'Filemanager', 'width=900,height=600'); + + return false; + }); +``` + +2. define a function named `SetUrl` : + +```javascript + function SetUrl(url){ + + //set the value of the desired input to image url,often this is a hidden input + $('#thumbnail').val(url); + + //set or change the feature image src,recall wordpress feature image + $('#feature-img-container').find('img').attr('src',url); + } +``` + + ## Config In `config/lfm.php` : diff --git a/src/views/index.blade.php b/src/views/index.blade.php index a56fbfe8..99f76e07 100644 --- a/src/views/index.blade.php +++ b/src/views/index.blade.php @@ -487,9 +487,8 @@ function getUrlParam(paramName) { parent.CKEDITOR.tools.callFunction(getUrlParam('CKEditorCleanUpFuncNum')); } } else { - // use FCKEditor 2.0 integration method - if (data['Properties']['Width'] != '') { + if (typeof data != 'undefined' && data['Properties']['Width'] != '') { var p = url; var w = data['Properties']['Width']; var h = data['Properties']['Height']; @@ -508,6 +507,7 @@ function getUrlParam(paramName) { window.close(); } + //end useFile function notImp() { bootbox.alert('Not yet implemented!');; @@ -534,6 +534,7 @@ function makeRandom() { } return text; } + From 031eb7abb0e1fe2045650c8db60c56ffa543d97f Mon Sep 17 00:00:00 2001 From: Amin Mazrouei Date: Sun, 20 Mar 2016 21:34:41 +0430 Subject: [PATCH 6/8] update readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c73f0995..032f0eaf 100644 --- a/README.md +++ b/README.md @@ -155,7 +155,7 @@ If you are going to use filemanager independently,meaning set the value of an in }); ``` -2. define a function named `SetUrl` : +2. define a function named `SetUrl`: ```javascript function SetUrl(url){ From a0df52bbe657fd6f8153550ba76b686c5f4b92a6 Mon Sep 17 00:00:00 2001 From: Amin Mazrouei Date: Sun, 20 Mar 2016 21:39:47 +0430 Subject: [PATCH 7/8] updated readme --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 032f0eaf..7bf2d736 100644 --- a/README.md +++ b/README.md @@ -143,6 +143,7 @@ If you are going to use filemanager independently,meaning set the value of an in ```html + ``` ```javascript From 5771f7ef47886a8fae54be1ed05728abf07b3c88 Mon Sep 17 00:00:00 2001 From: Amin Mazrouei Date: Sun, 20 Mar 2016 21:43:57 +0430 Subject: [PATCH 8/8] updated readme --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 7bf2d736..2a7fbf4a 100644 --- a/README.md +++ b/README.md @@ -135,7 +135,7 @@ PR is welcome! ``` -### Option 3: Independent use +##Independent use If you are going to use filemanager independently,meaning set the value of an input to selected photo/file url,follow this structure: