rename the page template modal.php to none.php because it can be used for more than modals

This commit is contained in:
rabuzarus 2016-05-15 13:41:37 +02:00
parent 8384ba833a
commit 64a2f2022b
9 changed files with 30 additions and 30 deletions

View file

@ -16,14 +16,14 @@ require_once('view/theme/frio/php/frio_boot.php');
$page_type = get_page_type($a->argv[0]);
// This is uncommented because we don't need it anymore.
// We try to to use links which resulting in $_GET["mode"] = "modal"
//if($page_type === "modal") {
// $_GET["mode"] = "modal";
// We try to to use links which resulting in $_GET["mode"] = "none"
//if($page_type === "none") {
// $_GET["mode"] = "none";
//}
if((isset($_GET["mode"]) AND ($_GET["mode"] == "modal"))) {
if((isset($_GET["mode"]) AND ($_GET["mode"] == "none"))) {
require "view/theme/frio/php/modes/modal.php";
require "view/theme/frio/php/modes/none.php";
} elseif($page_type === "standard_page") {
require "view/theme/frio/php/modes/standard.php";
} else {

View file

@ -95,7 +95,7 @@ var FileBrowser = {
$(".folders a, .path a").on("click", function(e){
e.preventDefault();
var url = baseurl + "/fbrowser/" + FileBrowser.type + "/" + this.dataset.folder + "?mode=modal";
var url = baseurl + "/fbrowser/" + FileBrowser.type + "/" + this.dataset.folder + "?mode=none";
// load new content to fbrowser window
$(".fbrowser").load(url,function(){
@ -161,10 +161,10 @@ var FileBrowser = {
$('#profile-rotator').hide();
return;
}
// location = baseurl + "/fbrowser/image/?mode=modal"+location['hash'];
// location = baseurl + "/fbrowser/image/?mode=none"+location['hash'];
// location.reload(true);
var url = baseurl + "/fbrowser/" + FileBrowser.type + "?mode=modal"
var url = baseurl + "/fbrowser/" + FileBrowser.type + "?mode=none"
// load new content to fbrowser window
$(".fbrowser").load(url,function(){
$(function() {FileBrowser.init(nickname, type, hash);});
@ -186,10 +186,10 @@ var FileBrowser = {
$('#profile-rotator').hide();
return;
}
// location = baseurl + "/fbrowser/file/?mode=modal"+location['hash'];
// location = baseurl + "/fbrowser/file/?mode=none"+location['hash'];
// location.reload(true);
var url = baseurl + "/fbrowser/" + FileBrowser.type + "?mode=modal"
var url = baseurl + "/fbrowser/" + FileBrowser.type + "?mode=none"
// load new content to fbrowser window
$(".fbrowser").load(url,function(){
$(function() {FileBrowser.init(nickname, type, hash);});

View file

@ -126,7 +126,7 @@ function removeAllhoverCards(event,priorTo) {
// Ajax request to get json contact data
function getContactData(purl, url, actionOnSuccess) {
var postdata = {
mode : 'modal',
mode : 'none',
profileurl : purl,
datatype : 'json',
};
@ -224,7 +224,7 @@ function getHoverCardContent(purl, url, callback) {
// Ajax request to get the raw template content
function getHoverCardTemplate (url, callback) {
var postdata = {
mode: 'modal',
mode: 'none',
datatype: 'tpl'
};

View file

@ -91,7 +91,7 @@ Dialog.show = function(url) {
Dialog._get_url = function(type, name, id) {
var hash = name;
if (id !== undefined) hash = hash + "-" + id;
return "fbrowser/"+type+"/?mode=modal#"+hash;
return "fbrowser/"+type+"/?mode=none#"+hash;
};
// does load the filebrowser into the jot modal
@ -119,7 +119,7 @@ Dialog._load = function(url) {
var type = $("#fb-type").attr("value");
// try to fetch the hash form the url
var match = url.match(/fbrowser\/[a-z]+\/\?mode=modal(.*)/);
var match = url.match(/fbrowser\/[a-z]+\/\?mode=none(.*)/);
var hash = match[1];
// initialize the filebrowser
@ -157,7 +157,7 @@ function loadModalTitle() {
function addToModal(url) {
var char = qOrAmp(url);
var url = url + char + 'mode=modal';
var url = url + char + 'mode=none';
var modal = $('#modal').modal();
modal

View file

@ -16,8 +16,8 @@
function load_page(&$a) {
if(isset($_GET["mode"]) AND ($_GET["mode"] == "minimal")) {
require "view/theme/frio/minimal.php";
} elseif((isset($_GET["mode"]) AND ($_GET["mode"] == "modal"))) {
require "view/theme/frio/modal.php";
} elseif((isset($_GET["mode"]) AND ($_GET["mode"] == "none"))) {
require "view/theme/frio/none.php";
} else {
$template = 'view/theme/' . current_theme() . '/'
. ((x($a->page,'template')) ? $a->page['template'] : 'default' ) . '.php';

View file

@ -1,11 +0,0 @@
<?php
/**
* @file view/theme/frio/php/modes/modal.php
* @brief The site template for Modals
*
* This themplate is used for bs modals. So outputs
* only the pure content
*/
if(x($page,'content')) echo $page['content'];

11
php/modes/none.php Normal file
View file

@ -0,0 +1,11 @@
<?php
/**
* @file view/theme/frio/php/modes/none.php
* @brief The site template for pure content (e.g. (modals)
*
* This themplate is used e.g for bs modals. So outputs
* only the pure content
*/
if(x($page,'content')) echo $page['content'];

View file

@ -242,7 +242,7 @@
<div class="hidden-sm hidden-xs">
<ul class="nav navbar-nav navbar-right">
<li><a href="register" data-toggle="tooltip" title="{{$register.title}}"><i class="fa fa-street-view fa-fw"></i> {{$register.desc}}</a></li>
<li><a href="login?mode=modal" data-toggle="tooltip" title="{{$login}}"><i class="fa fa-sign-in fa-fw"></i> {{$login}}</a></li>
<li><a href="login?mode=none" data-toggle="tooltip" title="{{$login}}"><i class="fa fa-sign-in fa-fw"></i> {{$login}}</a></li>
</ul>
</div>
</div>

View file

@ -90,7 +90,7 @@ as the value of $top_child_total (this is done at the end of this file)
{{if $item.edpost}} {{* edit the posting *}}
<li role="menuitem">
<a href="#" onclick="editpost('{{$item.edpost.0}}?mode=modal'); return false;" title="{{$item.edpost.1}}" class="navicon pencil"><i class="fa fa-pencil"></i> {{$item.edpost.1}}</a>
<a href="#" onclick="editpost('{{$item.edpost.0}}?mode=none'); return false;" title="{{$item.edpost.1}}" class="navicon pencil"><i class="fa fa-pencil"></i> {{$item.edpost.1}}</a>
</li>
{{/if}}