webbuild-cgi: fix for files upload and minor cosmetic changes to rebuild deps function

This commit is contained in:
Silvan Calarco 2016-03-11 14:46:59 +01:00
parent 537b80a4c4
commit 7e78d60c90

View File

@ -1503,10 +1503,10 @@ if [ "$MAINTAINERMODE" != "true" ]; then
echo -n "<div class=\"operationpanelupload\"><b>Upload source:</b>" echo -n "<div class=\"operationpanelupload\"><b>Upload source:</b>"
echo -n "<form name=\"form\" action=\"javascript:\" method=\"POST\" enctype=\"multipart/form-data\">" echo -n "<form name=\"form\" action=\"javascript:\" method=\"POST\" enctype=\"multipart/form-data\">"
echo -n "<input id=\"fileToUpload\" type=\"file\" size=\"10\" name=\"fileToUpload\" class=\"input\">" echo -n "<input id=\"fileToUpload\" type=\"file\" size=\"10\" name=\"fileToUpload\" class=\"input\">"
echo -n "<button class=\"button\" id=\"buttonUpload\" onclick=ajaxFileUpload(\"" echo -n "<input type=\"button\" class=\"button\" id=\"buttonUpload\" onclick=ajaxFileUpload(\""
echo -n "REQUEST=uploadsource&ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&" echo -n "REQUEST=uploadsource&ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&PACKAGE=$PACKAGEENCODED&"
echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue())+\"&" echo -n "SPECTEXT=\"+encodeURIComponent(editor.getValue())+\"&"
echo -n "UPLOADFILENAME=\"+encodeURIComponent(getElementById('fileToUpload').value));>Upload</button>" echo -n "UPLOADFILENAME=\"+encodeURIComponent(getElementById('fileToUpload').value)); value=\"Upload\">"
echo -n "</form>" echo -n "</form>"
echo -n "</div>" echo -n "</div>"
# info from package sources # info from package sources
@ -1988,7 +1988,7 @@ $PACKAGE.spec $RPMFORCEADD && $AUTOSPEC_CMD -u $PACKAGE -a10 --server $SENDREPOS
# fi # fi
fi fi
;; ;;
"repositorymassrebuilddependant") "repositorymassrebuilddependent")
if [ ! "$PACKAGES" ]; then if [ ! "$PACKAGES" ]; then
echo "ERROR: no package(s) selected." echo "ERROR: no package(s) selected."
RET=1 RET=1
@ -2280,8 +2280,8 @@ if [ "$MAINTAINERMODE" = "true" ]; then
echo -n ",\"`cgi_encodevar "Rebuild <b>"`\"+p+\"`cgi_encodevar "</b> from <b>$REPOSITORY</b> and send to <b>"`\"+getSelectedValueById('repositoryimportto')+" echo -n ",\"`cgi_encodevar "Rebuild <b>"`\"+p+\"`cgi_encodevar "</b> from <b>$REPOSITORY</b> and send to <b>"`\"+getSelectedValueById('repositoryimportto')+"
echo -n "\"`cgi_encodevar "</b>?"`\"" echo -n "\"`cgi_encodevar "</b>?"`\""
echo -n "); class=redbutton>" echo -n "); class=redbutton>"
# mass rebuild of dependant packages # mass rebuild of dependent packages
echo -n "<input type=button value=\"rebuild dependant\" onclick=" echo -n "<input type=button value=\"rebuild deps\" onclick="
echo -n "p=getCheckedValuesByName('packagescheckbox');" echo -n "p=getCheckedValuesByName('packagescheckbox');"
echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&" echo -n "ajax_getvalues(\"ENVIRONMENT=$ENVIRONMENT&REPOSITORY=$REPOSITORY&"
echo -n "PACKAGES=\"+encodeURIComponent(p)+\"&" echo -n "PACKAGES=\"+encodeURIComponent(p)+\"&"
@ -2291,8 +2291,8 @@ if [ "$MAINTAINERMODE" = "true" ]; then
echo -n "REPOSITORYFORCE=\"+getElementById('repositoryforce').checked+\"&" echo -n "REPOSITORYFORCE=\"+getElementById('repositoryforce').checked+\"&"
echo -n "MASSREBUILDCHANGELOG=\"+encodeURIComponent(getElementById('massrebuildchangelog').value)+\"&" echo -n "MASSREBUILDCHANGELOG=\"+encodeURIComponent(getElementById('massrebuildchangelog').value)+\"&"
echo -n "MASSREBUILDBUILDREQ=\"+encodeURIComponent(getElementById('massrebuildbuildreq').value)+\"&" echo -n "MASSREBUILDBUILDREQ=\"+encodeURIComponent(getElementById('massrebuildbuildreq').value)+\"&"
echo -n "SENDREPOSITORY=$REPOSITORY&REQUEST=repositorymassrebuilddependant\"" echo -n "SENDREPOSITORY=$REPOSITORY&REQUEST=repositorymassrebuilddependent\""
echo -n ",\"`cgi_encodevar "Rebuild package which depend on <b>"`\"+p+\"`cgi_encodevar "</b> in <b>$REPOSITORY</b> and send to <b>"`\"+getSelectedValueById('repositoryimportto')+" echo -n ",\"`cgi_encodevar "Rebuild package(s) which depend on <b>"`\"+p+\"`cgi_encodevar "</b> in <b>$REPOSITORY</b> and send to <b>"`\"+getSelectedValueById('repositoryimportto')+"
echo -n "\"`cgi_encodevar "</b>?"`\"" echo -n "\"`cgi_encodevar "</b>?"`\""
echo -n "); class=redbutton>" echo -n "); class=redbutton>"
# changelog for mass rebuild # changelog for mass rebuild