Commit 627a1a43 authored by yPhil's avatar yPhil

Wiki: Introduction

parent 4d6e0281
......@@ -220,6 +220,7 @@ div.flexBox {
width:-moz-available;
display:flex;
justify-content: space-between;
flex-wrap: wrap;
}
div.flexBox > label {
......
MOB.dialog = {
kill:function($dialog) {
console.info('Kill!');
$dialog.dialog( 'destroy' );
$dialog.dialog('destroy');
$('#mobDialogs').empty();
},
help:function($button) {
var $tabs = $('#tabs');
var $a = $button.prev('a.ui-tabs-anchor');
var tabId = $a.attr('href');
var $selectedTab = $a.parent();
var $selectedPanel = $tabs.find(tabId);
var selectedTabIndex = $tabs.tabs('option', 'active');
var previousTabIndex = selectedTabIndex === 0 ? 0 : selectedTabIndex -1;
$('#mobDialogs').load('/static/templates/dialogs.html #killDialog', function() {
var $dialog = $('#killDialog');
$dialog.dialog({
title: MOB.tr('Tab: Kill'),
autoOpen: false,
closeOnEscape: true,
resizable: false,
height: 'auto',
width: 400,
modal: true,
buttons: [
{
text: MOB.tr('Delete'),
title: MOB.tr('Delete'),
icon: "ui-icon-alert",
class: "dangerous translate",
click: function() {
$selectedTab.remove();
$selectedPanel.remove();
MOB.tab.saveTabs();
MOB.dialog.kill($dialog);
$tabs.tabs('option', 'active', previousTabIndex).tabs('refresh');
}
},
{
text: MOB.tr('Cancel'),
title: MOB.tr('Cancel'),
class: 'translate',
click: function() {
MOB.dialog.kill($dialog);
}
}
],
open: function () {
$('.ui-widget-overlay').on('click', function() {
MOB.dialog.kill($dialog);
});
$dialog.children('p').append(MOB.tr('Really delete this tab? (%1, %2 feeds)', $a.text(), $selectedPanel.find('li.feed').length));
}
});
$dialog.dialog('open');
});
},
feedPrefs:function($feedPrefsButton, isNewFeed) {
$('#mobDialogs').load('/static/templates/dialogs.html #feedPrefs', function() {
......@@ -431,8 +494,15 @@ MOB.dialog = {
title: MOB.tr('What? No'),
class: 'translate',
click: function() {
if (qn >= questions.length)
MOB.dialog.kill($dialog);
else {
MOB.dialog.question(qn++);
MOB.dialog.kill($dialog);
}
console.log('Question: (%s/%s)', qn, questions.length);
}
},
{
......
......@@ -7,8 +7,9 @@ $('<div id="menu">').appendTo($('body')).load('/static/templates/menu.html', fun
$saveButton = $('#saveTabs').button(),
$langMenu = $('select#language'),
$help = $('button#help').button(),
$donate = $('button#donate').button().tooltip(),
$profile = $('button#profile').button().tooltip(),
$profile = $('button#profile').button(),
$slider = $('div#gallerySpeedSlider'),
$spinner = $('#gallerySpeedSpinner');
......@@ -17,6 +18,12 @@ $('<div id="menu">').appendTo($('body')).load('/static/templates/menu.html', fun
// }).selectmenu( "menuWidget" )
// .addClass( "overflow" );
$profile.tooltip({
classes: {
"ui-tooltip": "ui-corner-all ui-widget-shadow icon-heartbeat"
}
});
MOB.utilities.translate();
$langMenu.val(MOB.prefs.readConfig('lang')).prop('selected', true);
......@@ -48,6 +55,11 @@ $('<div id="menu">').appendTo($('body')).load('/static/templates/menu.html', fun
MOB.dialog.question(0);
});
$help.click(function (event) {
event.preventDefault();
location.href='https://bitbucket.org/yphil/mobylette/wiki/Home';
});
$donate.click(function (event) {
event.preventDefault();
location.href='https://liberapay.com/yPhil/donate';
......
......@@ -160,6 +160,13 @@
</legend>
<div class="flexBox">
<button id="help"
class="unique icon-motorcycle translate"
data-content="Help"
data-title="Help">
Help
</button>
<button id="profile"
class="grow icon-police translate"
data-content="Profile"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment