Skip to content

Commit

Permalink
Merge pull request #656 from FrozenNode/dev
Browse files Browse the repository at this point in the history
Merge 4.12.0 into master
  • Loading branch information
David Mathews committed Aug 30, 2014
2 parents 6db8289 + b9ea7d7 commit f2b50f8
Show file tree
Hide file tree
Showing 2,285 changed files with 13,519 additions and 2,030 deletions.
16 changes: 16 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
## Changelog

### 4.12.0
- Added CKEditor to composer to keep updated
- Added Scrollable Data Table ranther than dropping the columns
- Added the use of checkboxes for boolean filters
- Added the ability to create select2 translation files
- Added Arabic Translation files
- Added Bulgarian Translation files
- Added Finnish Translation files
- Added Turkish Translation files
- Added Danish timepicker translation file
- Bugfix: Fixed the routing order for File routes
- BugFix: Fixed the German Translation file
- Bugfix: Freeze actions while image uploading is in progress added to keep people from clicking off the page while image is uploading
- Bugfix: Call resizePage() after getting ajax response to fix with the page sizing and not being able to see the full datatable
- Bugfix: Replace isSoftDeleting with issset(...->runSoftDelete) for Laravel 4.2 support

### 4.11.2
- Bugfix: Strange legacy issue that was never caught with passing a no-op to array_get

Expand Down
10 changes: 9 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
},
"require": {
"php": ">=5.3.0",
"laravel/framework": "4.*"
"laravel/framework": "4.*",
"ckeditor/ckeditor": "4.*"
},
"require-dev": {
"mockery/mockery": "0.8.0"
Expand All @@ -28,5 +29,12 @@
"Frozennode\\Administrator": "src/"
}
},
"scripts": {
"post-update-cmd": [
"if [ -d \"public/js/ckeditor/\" ] \nthen \nrm -R public/js/ckeditor/ \nfi ",
"if [ -d \"vendor/ckeditor/ckeditor/\" ] \nthen \nmv vendor/ckeditor/ckeditor/ public/js/ \nfi",
"if [ -d \"vendor/ckeditor/\" ] \nthen \nrm -R vendor/ckeditor/ \nfi"
]
},
"minimum-stability": "dev"
}
2 changes: 1 addition & 1 deletion docs/localization.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ There are no special exceptions in the model config files...so you can localize

Administrator currently supports the following languages:

> ca da de en es eu fr hu it ja nl pl pt pt-BR ru se si sr tr uk vi zh-CN
> ar bg ca da de en es eu fi fr hu it ja nl pl pt pt-BR ru se si sr tr uk vi zh-CN zh-TW
If you don't see the language you want, [contributing a new language is crazy easy](#contributing)!

Expand Down
4 changes: 4 additions & 0 deletions public/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -1173,6 +1173,10 @@ body label {
#admin_page #content div.table_container div.page_container div.per_page input[type=hidden] {
width: 70px;
}
#admin_page #content div.table_container div.table_scrollable {
width:100%;
overflow-x:auto;
}
#admin_page #content div.table_container table.results {
width: 100%;
margin-bottom: 10px;
Expand Down
5 changes: 5 additions & 0 deletions public/css/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -427,6 +427,11 @@ body{
}
}

div.table_scrollable {
width:100%;
overflow-x:auto;
}

table.results {
width: 100%;
margin-bottom: 10px;
Expand Down
47 changes: 38 additions & 9 deletions public/js/admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@
*/
$dataTable: null,

/*
* If this is true, the dataTable is scrollable instead of
* skipping columns at the end
*
* @type bool
*/
dataTableScrollable: false,

/*
* The pixel points where the columns are hidden
*
Expand Down Expand Up @@ -58,12 +66,6 @@
* object
*/
listOptions: {},

/**
* The options for booleans
* array
*/
boolOptions: [{id: 'true', text: 'true'}, {id: 'false', text: 'false'}]
},

/*
Expand Down Expand Up @@ -289,6 +291,7 @@
complete: function()
{
self.freezeForm(false);
window.admin.resizePage();
},
success: function(response)
{
Expand Down Expand Up @@ -328,6 +331,10 @@
data: {_token: csrf},
dataType: 'json',
type: 'POST',
complete: function()
{
window.admin.resizePage();
},
success: function(response)
{
if (response.success)
Expand Down Expand Up @@ -1484,9 +1491,31 @@
//resize the page height
$('#admin_page').css({minHeight: usedHeight});

//resize the data table
if (window.admin)
window.admin.resizeDataTable();
//resize or scroll the data table
if (window.admin) {
if (! window.admin.dataTableScrollable)
window.admin.resizeDataTable();
else
window.admin.scrollDataTable();
}
},

/**
* Allows to scroll wide data tables (alternative to resizeDataTable)
*/
scrollDataTable: function()
{
if (!self.$tableContainer)
{
self.$tableContainer = $('div.table_container');
self.$dataTable = self.$tableContainer.find('table.results');
}

// exit if table is already wrapped
if (self.$dataTable.parent().hasClass('table_scrollable')) return true;

// wrap table within div.table_scrollable
self.$dataTable.wrap('<div class="table_scrollable"></div>')
},

/**
Expand Down
Loading

0 comments on commit f2b50f8

Please sign in to comment.