This repository has been archived by the owner on May 26, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 24
Feature/joomla acceptance #101
Merged
Merged
Changes from 4 commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
77354dc
Bring back the ugly joomla toolbar
dneukirchen 2649663
Remove layout related code
dneukirchen f77599f
Connect Vue with the joomla toolbar
dneukirchen 226d9ab
Remove unused lang
dneukirchen 76c1593
Remove duplicate if statement
dneukirchen File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
administrator/components/com_media/layouts/toolbar/create-folder.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage com_media | ||
* | ||
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
defined('_JEXEC') or die; | ||
$title = JText::_('COM_MEDIA_CREATE_NEW_FOLDER'); | ||
?> | ||
<button class="btn btn-sm btn-outline-info" onclick="MediaManager.Event.$emit('onClickCreateFolder');"> | ||
<span class="icon- fa fa-folder" title="<?php echo $title; ?>"></span> <?php echo $title; ?> | ||
</button> |
14 changes: 14 additions & 0 deletions
14
administrator/components/com_media/layouts/toolbar/delete.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage com_media | ||
* | ||
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
defined('_JEXEC') or die; | ||
$title = JText::_('JTOOLBAR_DELETE'); | ||
?> | ||
<button class="btn btn-sm btn-outline-danger"> | ||
<span class="icon- fa fa-trash-o" title="<?php echo $title; ?>"></span> <?php echo $title; ?> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. same |
||
</button> |
14 changes: 14 additions & 0 deletions
14
administrator/components/com_media/layouts/toolbar/upload.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?php | ||
/** | ||
* @package Joomla.Administrator | ||
* @subpackage com_media | ||
* | ||
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved. | ||
* @license GNU General Public License version 2 or later; see LICENSE.txt | ||
*/ | ||
defined('_JEXEC') or die; | ||
$title = JText::_('JTOOLBAR_UPLOAD'); | ||
?> | ||
<button class="btn btn-sm btn-success"> | ||
<span class="icon- fa fa-upload" title="<?php echo $title; ?>"></span> <?php echo $title; ?> | ||
</button> |
48 changes: 19 additions & 29 deletions
48
administrator/components/com_media/resources/scripts/components/app.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,35 @@ | ||
<template> | ||
<div class="media-container" :style="{minHeight: fullHeight}"> | ||
<media-toolbar></media-toolbar> | ||
<div class="media-main"> | ||
<div class="media-sidebar"> | ||
<media-tree :root="'/'"></media-tree> | ||
<div class="media-container row"> | ||
<div class="media-sidebar col-md-2 hidden-sm-down"> | ||
<media-tree :root="'/'"></media-tree> | ||
</div> | ||
<div class="media-main col-md-10"> | ||
<div class="card"> | ||
<div class="card-header"> | ||
<media-toolbar></media-toolbar> | ||
</div> | ||
<div class="card-block"> | ||
<media-browser></media-browser> | ||
</div> | ||
</div> | ||
<media-browser></media-browser> | ||
</div> | ||
<create-folder-modal></create-folder-modal> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import * as types from "./../store/mutation-types"; | ||
export default { | ||
name: 'media-app', | ||
methods: { | ||
/* Set the full height on the app container */ | ||
setFullHeight() { | ||
this.fullHeight = window.innerHeight + this.$el.offsetTop + 'px'; | ||
}, | ||
}, | ||
data() { | ||
return { | ||
// The full height of the app in px | ||
fullHeight: '', | ||
}; | ||
created() { | ||
// Listen to the on click create folder event | ||
MediaManager.Event.$on('onClickCreateFolder', (e) => { | ||
this.$store.commit(types.SHOW_CREATE_FOLDER_MODAL); | ||
}); | ||
}, | ||
mounted() { | ||
// Initial load the data | ||
this.$store.dispatch('getContents', this.$store.state.selectedDirectory); | ||
|
||
// Set the full height and add event listener when dom is updated | ||
this.$nextTick(() => { | ||
this.setFullHeight(); | ||
// Add the global resize event listener | ||
window.addEventListener('resize', this.setFullHeight) | ||
}); | ||
}, | ||
beforeDestroy() { | ||
// Remove the global resize event listener | ||
window.removeEventListener('resize', this.setFullHeight) | ||
}, | ||
} | ||
} | ||
</script> |
9 changes: 4 additions & 5 deletions
9
administrator/components/com_media/resources/scripts/components/breadcrumb/breadcrumb.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 0 additions & 44 deletions
44
administrator/components/com_media/resources/scripts/components/toolbar/toolbar.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,55 +1,11 @@ | ||
<template> | ||
<div class="media-toolbar"> | ||
<div class="media-toolbar-create"> | ||
<div class="btn-group"> | ||
<button class="btn btn-sm btn-success"> | ||
<span class="icon-apply icon-white"></span> {{ translate('COM_MEDIA_NEW') }} | ||
</button> | ||
<button type="button" class="btn btn-sm btn-success dropdown-toggle dropdown-toggle-split" | ||
data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></button> | ||
<ul class="dropdown-menu"> | ||
<li class="dropdown-item"> | ||
<a href="#" @click.prevent="showCreateFolderModal()">{{ translate('COM_MEDIA_CREATE_FOLDER') }}</a> | ||
</li> | ||
<li class="divider"></li> | ||
<li class="dropdown-item"><a href="#">{{ translate('COM_MEDIA_UPLOAD_FILE') }}</a></li> | ||
<li class="dropdown-item"><a href="#">{{ translate('COM_MEDIA_UPLOAD_FOLDER') }}</a></li> | ||
</ul> | ||
</div> | ||
</div> | ||
<media-breadcrumb></media-breadcrumb> | ||
<ul class="media-tools"> | ||
<li> | ||
<a href="#"><span class="fa fa-list"></span></a> | ||
</li> | ||
<li> | ||
<a href="#"><span class="fa fa-info-circle"></span></a> | ||
</li> | ||
<li> | ||
<a href="#"><span class="fa fa-question-circle"></span></a> | ||
</li> | ||
<li> | ||
<a href="#"><span class="fa fa-cog"></span></a> | ||
</li> | ||
</ul> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import * as types from "./../../store/mutation-types"; | ||
export default { | ||
name: 'media-toolbar', | ||
methods: { | ||
/* Close the modal instance */ | ||
showCreateFolderModal() { | ||
this.$store.commit(types.SHOW_CREATE_FOLDER_MODAL); | ||
}, | ||
/* Handle keydown events */ | ||
onKeyDown(event) { | ||
if (this.show && event.keyCode == 27) { | ||
this.close(); | ||
} | ||
} | ||
}, | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove the icon- and use why span and not i (like common in bs?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<i>
isn鈥檛 the icon tag, it鈥檚 the italic tag, and it doesn鈥檛 make much difference which you pick.Dont know who the **** came up with the idea to use
<i>
s, but it is semantically not correct.<span>
is more semantically correct, because it has no semantics.And regarding icon- class: it is currently needed by the admin theme to render buttons in that style.