[Pkg-mozext-commits] [automatic-save-folder] 78/133: Add : A button is now available in the option tab to check for beta updates. It will not update the add-on automatically, it's only a verification.

David Prévot taffit at moszumanska.debian.org
Mon Apr 27 20:33:54 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch wip
in repository automatic-save-folder.

commit c96f23d4434d8ecb41faf96def060732b415c761
Author: Cyan <Cyan at d0063192-6b2e-11de-89a9-0b20f3e2dceb>
Date:   Mon Jul 19 15:49:55 2010 +0000

    Add : A button is now available in the option tab to check for beta updates.
    It will not update the add-on automatically, it's only a verification.
    
    I think I will show this button only on beta version,
    I'll see how often it's used to decide if I leave it for final release.
    
    git-svn-id: http://automatic-save-folder.googlecode.com/svn/trunk@84 d0063192-6b2e-11de-89a9-0b20f3e2dceb
---
 content/asf.js       | 31 +++++++++++++++++++++++++++++++
 content/common.dtd   |  2 +-
 content/options.xul  |  8 ++++++++
 locale/en-US/asf.dtd |  5 +++++
 locale/fr/asf.dtd    |  5 +++++
 locale/it/asf.dtd    |  5 +++++
 locale/ru/asf.dtd    |  5 +++++
 7 files changed, 60 insertions(+), 1 deletion(-)

diff --git a/content/asf.js b/content/asf.js
index d85fd77..c8d2df3 100644
--- a/content/asf.js
+++ b/content/asf.js
@@ -887,6 +887,37 @@ var automatic_save_folder = {
 	},
 
 
+	checkBetaVersion: function() {
+		var current_version = document.getElementById('asf-version').value;
+		var latest_version = "1.0.2b Rev85";
+		var XhrObj = new XMLHttpRequest();
+		XhrObj.onreadystatechange = function()
+		{
+			if (XhrObj.readyState == 4 && XhrObj.status == 200)
+			{
+				latest_version = XhrObj.responseText ;
+				if(automatic_save_folder.versionChecker.compare(latest_version, current_version) > 0)
+				{
+					document.getElementById('asf-checkBetaUpdate').hidden = true;
+					document.getElementById('asf-betaVersionAvailable').hidden = false;
+					document.getElementById('asf-version').value = latest_version;
+					document.getElementById('asf-version').hidden = false;
+					
+				}
+				else
+				{
+					document.getElementById('asf-checkBetaUpdate').hidden = true;
+					document.getElementById('asf-betaVersionNotAvailable').hidden = false;
+				}
+			}
+		}
+		
+		XhrObj.open("POST", "http://asf.mangaheart.org/latestBetaVersion.php");
+		XhrObj.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
+		XhrObj.send("version="+current_version);
+	},
+
+
 	DownloadSort_isEnabled: function() {
 		// Check for Download sort add-on, if enabled return true. 
 		
diff --git a/content/common.dtd b/content/common.dtd
index 5fc967f..8c4c745 100644
--- a/content/common.dtd
+++ b/content/common.dtd
@@ -1,5 +1,5 @@
 <!-- Current version -->
-<!ENTITY asf.version "1.0.2b Rev83">
+<!ENTITY asf.version "1.0.2bRev84">
 
 <!ENTITY about.translators "
 - en-US : Cyan, Narayan<br />
diff --git a/content/options.xul b/content/options.xul
index b329c21..22068f5 100644
--- a/content/options.xul
+++ b/content/options.xul
@@ -188,6 +188,14 @@
 								</hbox>
 								<checkbox id="asf-viewpathselect" preference="asf_viewpathselect"  label="&asf.viewpathselect.bool;" tooltip="tooltip_viewpathselect" style="margin-left:25px;white-space:pre-wrap"/>
 							</groupbox>
+							<groupbox><caption label="&asf.options.checkUpdate.label;" />
+								<hbox>
+									<button id="asf-checkBetaUpdate" label="&asf.options.checkBetaUpdate.button;" oncommand="automatic_save_folder.checkBetaVersion();"/>
+									<description id="asf-betaVersionAvailable" hidden="true">&asf.options.betaVersionAvailable.label;</description>
+									<description id="asf-betaVersionNotAvailable" hidden="true">&asf.options.betaVersionNotAvailable.label;</description>
+									<description id="asf-version" hidden="true" value="&asf.version;" />
+								</hbox>
+							</groupbox>
 						</vbox>
 					</tabpanel>
 					<tabpanel>
diff --git a/locale/en-US/asf.dtd b/locale/en-US/asf.dtd
index 6a29517..7419f3b 100644
--- a/locale/en-US/asf.dtd
+++ b/locale/en-US/asf.dtd
@@ -71,6 +71,11 @@
 <!ENTITY asf.viewpathselect.bool "View the list of folders">
 <!ENTITY asf.viewpathselect.tooltip "Activate a drop-down menu with all the filter's path.">
 
+<!ENTITY asf.options.checkUpdate.label "Update">
+<!ENTITY asf.options.checkBetaUpdate.button "Check if there is a new beta version">
+<!ENTITY asf.options.betaVersionAvailable.label "A new version is available:">
+<!ENTITY asf.options.betaVersionNotAvailable.label "No new version available.">
+
 <!ENTITY asf.options.groupbox3.label "Filtering options">
 <!ENTITY asf.lastdir.bool "Affect the folder for the 'save as...' command when a filter matches">
 <!ENTITY asf.usecurrenturl.bool "Use the current website URL to verify the filter's domain if the hosted domain doesn't match.">
diff --git a/locale/fr/asf.dtd b/locale/fr/asf.dtd
index 37615d9..7654949 100644
--- a/locale/fr/asf.dtd
+++ b/locale/fr/asf.dtd
@@ -71,6 +71,11 @@
 <!ENTITY asf.viewpathselect.bool "Afficher la liste des filtres">
 <!ENTITY asf.viewpathselect.tooltip "Active le menu déroulant contenant le chemin de chaque filtre.">
 
+<!ENTITY asf.options.checkUpdate.label "Mise à jour">
+<!ENTITY asf.options.checkBetaUpdate.button "Vérifier si une nouvelle version béta est disponible">
+<!ENTITY asf.options.betaVersionAvailable.label "Une nouvelle version est disponible :">
+<!ENTITY asf.options.betaVersionNotAvailable.label "Pas de nouvelle version disponible.">
+
 <!ENTITY asf.options.groupbox3.label "Pendant le filtrage">
 <!ENTITY asf.lastdir.bool "Modifier aussi le dossier d'enregistrement utilisé par le menu 'Enregistrer sous... (Ctrl+S)'">
 <!ENTITY asf.usecurrenturl.bool "Utiliser l'adresse du site courant pour comparer le domaine du filtre si le domaine d'hébergement ne correspond pas.">
diff --git a/locale/it/asf.dtd b/locale/it/asf.dtd
index 2886503..207bcf9 100644
--- a/locale/it/asf.dtd
+++ b/locale/it/asf.dtd
@@ -71,6 +71,11 @@
 <!ENTITY asf.viewpathselect.bool "Vedi la lista dei filtri">
 <!ENTITY asf.viewpathselect.tooltip "Visualizza un menu con la lista di tutti i percorsi dei filtri.">
 
+<!ENTITY asf.options.checkUpdate.label "Update">
+<!ENTITY asf.options.checkBetaUpdate.button "Check if there is a new beta version">
+<!ENTITY asf.options.betaVersionAvailable.label "A new version is available:">
+<!ENTITY asf.options.betaVersionNotAvailable.label "No new version available.">
+
 <!ENTITY asf.options.groupbox3.label "Filtering options">
 <!ENTITY asf.lastdir.bool "Ha effetto sulla cartella per il comando 'Salva come...' quando un filtro corrisponde">
 <!ENTITY asf.usecurrenturl.bool "Use the current website URL to verify the filter's domain if the hosted domain doesn't match.">
diff --git a/locale/ru/asf.dtd b/locale/ru/asf.dtd
index 0ef1d91..014fafd 100644
--- a/locale/ru/asf.dtd
+++ b/locale/ru/asf.dtd
@@ -71,6 +71,11 @@
 <!ENTITY asf.viewpathselect.bool "Показывать список папок">
 <!ENTITY asf.viewpathselect.tooltip "Активировать меню перетаскивания мышкой для всех папок фильтров.">
 
+<!ENTITY asf.options.checkUpdate.label "Update">
+<!ENTITY asf.options.checkBetaUpdate.button "Check if there is a new beta version">
+<!ENTITY asf.options.betaVersionAvailable.label "A new version is available:">
+<!ENTITY asf.options.betaVersionNotAvailable.label "No new version available.">
+
 <!ENTITY asf.options.groupbox3.label "Настройки фильтров">
 <!ENTITY asf.lastdir.bool "Изменять папку для команды "сохранить как..." когда есть подходящий фильтр">
 <!ENTITY asf.usecurrenturl.bool "Использовать пусть из строки адреса если не найден фильтр для домена загружаемого файла.">

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/automatic-save-folder.git



More information about the Pkg-mozext-commits mailing list