Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nova 4 Update #89

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
bc3b43e
Upgrade except vue changes
Apr 28, 2022
832a93b
Removed this.
ali-raza-saleem Apr 28, 2022
c2e13cc
Updated upload, delete, datepicker, fields(display only) functionality
ali-raza-saleem Apr 29, 2022
cb4809d
Updated Popup and Crop component
ali-raza-saleem May 11, 2022
e30d64a
Updated package fields and styles
ali-raza-saleem May 11, 2022
082397e
Fixed bug: Can not fetch existing folders list
ali-raza-saleem May 29, 2022
6165c25
Changed navigtion icon to camera
ali-raza-saleem May 30, 2022
15b5aa5
Fixed Bug: Failed to vertical scroll on tool and field
ali-raza-saleem May 31, 2022
2072ab0
Added Folder Search feature and fixed search window styling
ali-raza-saleem May 31, 2022
5fadb7d
Minified js
ali-raza-saleem May 31, 2022
c79fa1b
Styled More button in Loader
ali-raza-saleem May 31, 2022
5f84538
Sorted Folders on fetch and styled selected items on bulk select
ali-raza-saleem Jun 1, 2022
02960ff
Added Files sorting on fetch feature
ali-raza-saleem Jun 2, 2022
28d852a
Commented out alphabetical file sorting as sort by latest files is be…
ali-raza-saleem Jun 23, 2022
94b62cf
Made search case-insensitive and clear search on folder actions
ali-raza-saleem Jul 13, 2022
0e1456a
Browser can now store the visitor's state and made some modal styling…
ali-raza-saleem Jul 29, 2022
a9ed264
Fixed Bug: Toasted not showing error messages
ali-raza-saleem Aug 23, 2022
8824405
uploading file returns the file instance
muhammadsaeedparacha Oct 23, 2022
0b83a29
Added width to detail field container
ali-raza-saleem Oct 25, 2022
bf487d0
Added Sizing ability on Detail Field
ali-raza-saleem Oct 25, 2022
cd405ef
Style fixes Array Field
ali-raza-saleem Dec 14, 2022
ec34486
Dependent Form Field
ali-raza-saleem Dec 15, 2022
ba0f66e
Bug fix: Default value for array_key_exists on meta
ali-raza-saleem Dec 21, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added Files sorting on fetch feature
  • Loading branch information
ali-raza-saleem committed Jun 2, 2022
commit 02960ffabf73560571be27dd24e98a2baf386824
2 changes: 1 addition & 1 deletion dist/js/tool.js

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions resources/js/tool/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ export default {
array: this.items.array.concat(r.data.array),
total: r.data.total,
};
this.items.array = this.sortFiles(this.items.array);
})
.catch((e) => {
this.loading = false;
Expand Down Expand Up @@ -135,18 +136,23 @@ export default {
params: { searchQuery: query },
})
.then((r) => {
this.config.folders = this.sortObject(r.data);
this.config.folders = this.sortFolders(r.data);
});
},

sortObject(obj) {
sortFolders(obj) {
return Object.keys(obj)
.sort()
.reduce(function (result, key) {
result[key] = obj[key];
return result;
}, {});
},

sortFiles(files) {
return files.sort((a, b) => { return a.name > b.name ? 1 : -1; });
}

},
created() {
if ("onwheel" in document) wheel = "wheel";
Expand All @@ -171,7 +177,7 @@ export default {
Nova.request()
.get("/nova-vendor/nova-media-library/folders")
.then((r) => {
this.config.folders = this.sortObject(r.data);
this.config.folders = this.sortFolders(r.data);
});
}
}
Expand Down