Skip to content

Commit 5471c33

Browse files
authored
Update README.md
1 parent 9ce2692 commit 5471c33

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

README.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,11 @@ Simple media manager for your Laravel project. This package lets you open your f
1212
- Multiple thumbnail sizes
1313
- Multiple directories
1414
- Multiple instance
15+
- Configurable
1516
- More ...
1617

1718
# Todo List
19+
- [ ] Multi language
1820
- [ ] Multi user
1921
- [ ] UI improvement
2022
- [x] Thumbnail
@@ -27,6 +29,7 @@ Simple media manager for your Laravel project. This package lets you open your f
2729
- Laravel 5
2830

2931
# Tested
32+
- [ ] Laravel 5.6
3033
- [x] Laravel 5.5
3134
- [x] Laravel 5.4
3235
- [ ] Laravel 5.3
@@ -94,7 +97,7 @@ If you successfully integrate with other editors, then you can either create `is
9497
<textarea class="tinymce"></textarea>
9598
<script>
9699
var editor_config = {
97-
path_absolute : "{{url('')}}/",
100+
path_absolute: "{{url('')}}/",
98101
selector: "textarea.tinymce",
99102
plugins: [
100103
"advlist autolink lists link image charmap print preview hr anchor pagebreak",
@@ -104,19 +107,19 @@ If you successfully integrate with other editors, then you can either create `is
104107
],
105108
toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image media",
106109
relative_urls: false,
107-
file_browser_callback : function(field_name, url, type, win) {
110+
file_browser_callback: function(field_name, url, type, win) {
108111
var x = window.innerWidth || document.documentElement.clientWidth || document.getElementsByTagName('body')[0].clientWidth;
109112
var y = window.innerHeight|| document.documentElement.clientHeight|| document.getElementsByTagName('body')[0].clientHeight;
110113
111114
var cmsURL = editor_config.path_absolute + 'midia/open/tinymce4?field_name=' + field_name;
112115
113116
tinyMCE.activeEditor.windowManager.open({
114-
file : cmsURL,
115-
title : 'Filemanager',
116-
width : x * 0.8,
117-
height : y * 0.8,
118-
resizable : "yes",
119-
close_previous : "no"
117+
file: cmsURL,
118+
title: 'Filemanager',
119+
width: x * 0.8,
120+
height: y * 0.8,
121+
resizable: "yes",
122+
close_previous: "no"
120123
});
121124
}
122125
};
@@ -230,24 +233,23 @@ You can also use the configuration in `.midia()`. The following is the default c
230233
load_ajax_type: 'get', // default ajax type to fetch files is 'get', you can change with 'post' http method
231234
}
232235
```
233-
or you can use data-attributes to change the settings, use `data-midia` followed by your setting attributes, i.e. `data-midia-your_setting_want_to_change` :
236+
or you can use data-attributes to change the settings, use `data-midia` followed by your setting attributes, i.e. `data-midia-your_setting_want_to_change`:
234237
```html
235238
<div data-midia data-midia-title="Inline Midia" data-midia-inline="true" data-midia-actions='["rename","delete"]' data-midia-can_choose="false"></div>
236239
```
237240

238241
# Override Default Settings
239-
You can override default settings for all instances by add following code before creating instance :
242+
You can override default settings for all instances by add following code before creating instance:
240243
```javascript
241244
$.fn.midia.defaultSettings.name_of_setting = 'new value';
242245

243-
// Example :
246+
// Example:
244247
$.fn.midia.defaultSettings.title = 'Midia Manager';
245248
$.fn.midia.defaultSettings.base_url = '/';
246249
```
247250

248251
# Setter
249-
250-
You can also change to settings on the fly but you have to refresh after that :
252+
You can also change to settings on the fly but you have to refresh after that:
251253
```javascript
252254
var midiaObj = $(".midia-toggle").midia();
253255
midiaObj.midia('title', 'New Title').midia('refresh');
@@ -256,12 +258,12 @@ You can also change to settings on the fly but you have to refresh after that :
256258
```
257259

258260
# Getter
259-
You can get the the value from this following Midia Attributes :
260-
- el : get the dom elements
261-
- settings : get the settings
262-
- value : get the value, after you pick a file
261+
You can get the the value from this following Midia Attributes:
262+
- el: get the dom elements
263+
- settings: get the settings
264+
- value: get the value, after you pick a file
263265

264-
with this way :
266+
with this way:
265267
```javascript
266268
var midiaObj = $(".midia-toggle").midia();
267269
midiaObj.midia('el');
@@ -270,12 +272,12 @@ with this way :
270272
```
271273

272274
# Methods
273-
Midia has this following methods :
274-
- refresh : refresh your midia, including empty the value, and implement the settings you change before.
275-
- open : open the midia dialog modal
276-
- close : close the midia dialog modal
275+
Midia has this following methods:
276+
- refresh: refresh your midia, including empty the value, and implement the settings you change before.
277+
- open: open the midia dialog modal
278+
- close: close the midia dialog modal
277279

278-
with this way :
280+
with this way:
279281
```javascript
280282
var midiaObj = $(".midia-toggle").midia();
281283
midiaObj.midia('refresh');
@@ -344,4 +346,4 @@ return [
344346
This package was first initialized by [@nauvalazhar](https://github.com/nauvalazhar) and maintained by [@itskodinger](https://github.com/itskodinger). Then, it became extraordinary by all contributors: [@rizalfakhri12](https://github.com/rizalfakhri12) [@mrofi](https://github.com/mrofi) [@captainspain](https://github.com/captainspain) [@zeroseed](https://github.com/zeroseed)
345347

346348
# License
347-
MIT License
349+
[MIT License](https://github.com/itskodinger/midia/blob/master/LICENSE)

0 commit comments

Comments
 (0)