mirror of
https://github.com/j-a-n/raspberrymatic-addon-rmupdate.git
synced 2023-10-10 13:37:40 +02:00
Change button label, cleanup
This commit is contained in:
parent
4900975f18
commit
1b3f665ee8
@ -29,7 +29,7 @@ namespace eval rmupdate {
|
||||
variable install_log "/usr/local/addons/rmupdate/var/install.log"
|
||||
variable install_lock "/usr/local/addons/rmupdate/var/install.lock"
|
||||
variable log_file "/tmp/rmupdate-addon-log.txt"
|
||||
variable log_level 4
|
||||
variable log_level 0
|
||||
variable lock_start_port 12100
|
||||
variable lock_socket
|
||||
variable lock_id_log_file 1
|
||||
@ -857,34 +857,6 @@ proc ::rmupdate::get_addon_info {{fetch_available_version 0} {fetch_download_url
|
||||
}
|
||||
}
|
||||
|
||||
#if {$as_json == 1} {
|
||||
# set json "\{"
|
||||
# set keys [array names addons]
|
||||
# set keys [lsort $keys]
|
||||
# set cur_addon_id ""
|
||||
# foreach key $keys {
|
||||
# set tmp [split $key "::"]
|
||||
# set addon_id [lindex $tmp 0]
|
||||
# set opt [lindex $tmp 2]
|
||||
# if {$cur_addon_id != $addon_id} {
|
||||
# if {$cur_addon_id != ""} {
|
||||
# set json [string range $json 0 end-1]
|
||||
# append json "\},"
|
||||
# }
|
||||
# append json "\"${addon_id}\":\{"
|
||||
# set cur_addon_id $addon_id
|
||||
# }
|
||||
# set val [json_string $addons($key)]
|
||||
# append json "\"${opt}\":\"${val}\","
|
||||
# }
|
||||
# if {$cur_addon_id != ""} {
|
||||
# set json [string range $json 0 end-1]
|
||||
# append json "\}"
|
||||
# }
|
||||
# append json "\}"
|
||||
# return $json
|
||||
#}
|
||||
|
||||
if {$as_json == 1} {
|
||||
set json "\["
|
||||
set keys [array names addons]
|
||||
|
@ -268,7 +268,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
var bupdate = $('<div class="ui '+ color +' basic '+ disabled +' button" id="button-update-' + addon.id + '">')
|
||||
.attr('data-update-addon-id', addon.id)
|
||||
.attr('data-update-addon-available-version', addon.available_version)
|
||||
.append($('<i class="sign in icon">'), 'update');
|
||||
.append($('<i class="sign in icon">'), (addon.version == addon.available_version) ? "reinstall" : "update");
|
||||
bupdate.click(function() {
|
||||
install_addon(this.getAttribute('data-update-addon-id'));
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user