Basic dialog created without useful content yet
This commit is contained in:
parent
150dfd8f60
commit
404ccf3498
42
src/admin/res/club/admin-club.css
Normal file
42
src/admin/res/club/admin-club.css
Normal file
@ -0,0 +1,42 @@
|
||||
|
||||
#dialog-club {
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: fixed;
|
||||
left: 0pt;
|
||||
top: 0pt;
|
||||
z-index: 1500;
|
||||
/*border-style: solid;*/
|
||||
}
|
||||
|
||||
#dialog-club > .dialog {
|
||||
background-color: white;
|
||||
width: 70vw;
|
||||
height: 60vh;
|
||||
position: absolute;
|
||||
left: 15vw;
|
||||
top: 20vh;
|
||||
/*z-index: 100;*/
|
||||
border-style: solid;
|
||||
/*visibility: visible;*/
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#dialog-club > .background {
|
||||
background-color: gray;
|
||||
width: 100vw;
|
||||
height: 100vh;
|
||||
position: absolute;
|
||||
left: 0pt;
|
||||
top: 0pt;
|
||||
/*z-index: 1000;*/
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.dialog-hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.form-disabled {
|
||||
overflow: hidden;
|
||||
}
|
34
src/admin/res/club/club.js
Normal file
34
src/admin/res/club/club.js
Normal file
@ -0,0 +1,34 @@
|
||||
|
||||
jQuery(function($){
|
||||
|
||||
$('#new-position').click(function(ev){
|
||||
ev.preventDefault();
|
||||
|
||||
var url = $('#new-position').attr('href');
|
||||
$.get(url, function(data){
|
||||
// console.log(data);
|
||||
$('#dialog-club > .dialog').html(data);
|
||||
$('body').addClass('form-disabled');
|
||||
$('#dialog-club').removeClass('dialog-hidden');
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
function closeDialog() {
|
||||
// console.log('b');
|
||||
$('#dialog-club > .dialog').html('');
|
||||
$('body').removeClass('form-disabled');
|
||||
$('#dialog-club').addClass('dialog-hidden');
|
||||
}
|
||||
|
||||
$(document).on('click', '#clubposition-abort', function(ev){
|
||||
ev.preventDefault();
|
||||
// console.log('a');
|
||||
closeDialog();
|
||||
});
|
||||
|
||||
$(document).on('click', '#clubposition-save', function(ev){
|
||||
ev.preventDefault();
|
||||
});
|
||||
|
||||
});
|
@ -7,7 +7,7 @@ defined('_JEXEC') or die;
|
||||
|
||||
?>
|
||||
|
||||
<form method="post" action="<?php echo $this->address; ?>">
|
||||
<form method="post" action="<?php echo $this->address; ?>" id='form-club'>
|
||||
<input type='hidden' name='id' value='<?php echo $this->object->getId(); ?>'>
|
||||
<h2>Stammdaten</h2>
|
||||
<table>
|
||||
@ -110,14 +110,14 @@ defined('_JEXEC') or die;
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
<?php endif; ?>
|
||||
<p><a href='#'><span class='icon-new'></span> Neuen Posten einfügen</a></p>
|
||||
<p><a href='<?php echo Route::_('index.php?option=com_clubs&view=clubposition&layout=new'); ?>' id='new-position'><span class='icon-new'></span> Neuen Posten einfügen</a></p>
|
||||
<?php endif; ?>
|
||||
|
||||
<input type='submit' value='Speichern'> <br /><a href='<?php echo Route::_('index.php?option=com_clubs&view=clubs'); ?>'>Zurück zur Übersicht</a>
|
||||
</form>
|
||||
|
||||
<div style='width: 100vw; height: 100vh; position: fixed; left: 0pt; top: 0pt; z-index: 1000; border-style: solid; display: none;'><!-- Set body css 'overflow: fixed;' to avoid scolling in the backgound -->
|
||||
<div style='background-color: gray; width: 100vw; height: 100vh; position: absolute; left: 0pt; top: 0pt; z-index: 1000; opacity: 0.5;'></div>
|
||||
<div style='background-color: red; width: 70vw; height: 60vh; position: absolute; left: 15vw; top: 20vh; z-index: 1001; border-style: solid; visibility: visible; overflow: visible;'>Ein Test</div>
|
||||
<div id='dialog-club' class='dialog-hidden'>
|
||||
<div class='background'></div>
|
||||
<div class='dialog'>Ein Test</div>
|
||||
</div>
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
|
||||
use Joomla\CMS\Factory;
|
||||
use Joomla\CMS\Toolbar\ToolbarHelper;
|
||||
|
||||
// No direct access.
|
||||
@ -18,6 +19,12 @@ class ClubsViewClub extends AbstractClubsViewSingle
|
||||
$userFactory = new CommonClubsModelFactoryUser();
|
||||
$this->users = $userFactory->loadElements();
|
||||
|
||||
JHtmlJquery::framework();
|
||||
Factory::getDocument()->addScript('components/com_clubs/res/club/club.js');
|
||||
Factory::getDocument()->addStyleSheet('components/com_clubs/res/club/admin-club.css');
|
||||
|
||||
// $this->
|
||||
|
||||
parent::display($tpl);
|
||||
}
|
||||
|
||||
|
37
src/admin/views/clubposition/view.html.php
Normal file
37
src/admin/views/clubposition/view.html.php
Normal file
@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
use Joomla\CMS\MVC\View\HtmlView;
|
||||
|
||||
// No direct access.
|
||||
defined('_JEXEC') or die;
|
||||
|
||||
JLoader::register("ClubsControllerPosition", JPATH_ROOT . "/administrator/components/com_clubs/controllers/position.php");
|
||||
|
||||
class ClubsViewClubPosition extends HtmlView
|
||||
{
|
||||
|
||||
function display($tpl = null)
|
||||
{
|
||||
|
||||
$positonFactory = new CommonClubsModelFactoryPosition();
|
||||
$userFactory = new CommonClubsModelFactoryUser();
|
||||
$this->positions = $positonFactory->loadElements();
|
||||
$this->users = $userFactory->loadElements();
|
||||
|
||||
$this->id = 'new';
|
||||
|
||||
parent::display($tpl);
|
||||
|
||||
jexit();
|
||||
}
|
||||
protected function getControllerName()
|
||||
{
|
||||
return 'position';
|
||||
}
|
||||
|
||||
protected function getFactory()
|
||||
{
|
||||
return new CommonClubsModelFactoryPosition();
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user