forked from joomla/joomla-cms
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Bring back the ugly joomla toolbar * Remove layout related code * Connect Vue with the joomla toolbar * Remove unused lang * Remove duplicate if statement
- Loading branch information
1 parent
2cd816b
commit b53adcc
Showing
12 changed files
with
1,718 additions
and
1,976 deletions.
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; ?> | ||
</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.