Changeset 756345b


Ignore:
Timestamp:
01/15/15 11:22:11 (6 weeks ago)
Author:
Kris Moore <kris@…>
Branches:
master, releng/10.1.1
Children:
47289e4
Parents:
729a115
Message:

Update AppCafe? web-interface to do handling of the PBI license files

Location:
src-webui/appweb
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • src-webui/appweb/dispatcher

    r2591e02 r756345b  
    102102     cmd="pbi" 
    103103     if [ "$target" != "__system__" ] ; then 
    104        cmd="$cmd $flag -j $target $origin" 
     104       cmd="$cmd $flag --licagree -j $target $origin" 
    105105     else 
    106        cmd="$cmd $flag $origin" 
     106       cmd="$cmd $flag --licagree $origin" 
    107107     fi 
    108108  elif [ "$app" == "pkg" ];then 
  • src-webui/appweb/share/html/include/functions.php

    r72f195f r756345b  
    189189 
    190190  // Is this app installed? 
    191   if ( array_search($pbiorigin, $inslist) !== false ) 
     191  if ( array_search($pbiorigin, $inslist) !== false ) { 
    192192   print("    <button title=\"Delete $pbiname\" style=\"background-color: Transparent;background-repeat:no-repeat;border: none;float:right;\" onclick=\"delConfirm('" . $pbiname ."','".rawurlencode($pbiorigin)."','".$pkgCmd."','".$jailUrl."')\"><img src=\"/images/application-exit.png\" height=22 width=22></button>\n"); 
    193   else 
    194    print("    <button title=\"Install $pbiname\" style=\"background-color: Transparent;background-repeat:no-repeat;border: none;float:right;\" onclick=\"addConfirm('" . $pbiname ."','".rawurlencode($pbiorigin)."','".$pkgCmd."','".$jailUrl."')\"><img src=\"/images/install.png\" height=22 width=22></button>\n"); 
     193  } else { 
     194   global $pbiindexdir; 
     195   if ( file_exists("$pbiindexdir/$pbiorigin/LICENSE") ) { 
     196     // Read the license data 
     197     $pbilic = file_get_contents("$pbiindexdir/$pbiorigin/LICENSE"); 
     198     print("    <button title=\"Install $pbiname\" style=\"background-color: Transparent;background-repeat:no-repeat;border: none;float:right;\" onclick=\"addConfirmLic('" . $pbiname ."','".rawurlencode($pbiorigin)."','".$pkgCmd."','".$jailUrl."','".$pbilic."')\"><img src=\"/images/install.png\" height=22 width=22></button>\n"); 
     199   } else { 
     200     print("    <button title=\"Install $pbiname\" style=\"background-color: Transparent;background-repeat:no-repeat;border: none;float:right;\" onclick=\"addConfirm('" . $pbiname ."','".rawurlencode($pbiorigin)."','".$pkgCmd."','".$jailUrl."')\"><img src=\"/images/install.png\" height=22 width=22></button>\n"); 
     201   } 
     202  } 
    195203 
    196204  print("    <a href=\"/?p=appinfo&app=".rawurlencode($pbiorigin)."&jail=$jailUrl&allPBI=$allPBI\" title=\"$pbicomment\"><img border=0 align=\"center\" height=48 width=48 src=\"/images/pbiicon.php?i=$pbicdir/icon.png\" style=\"float:left;\"></a>\n"); 
  • src-webui/appweb/share/html/js/appcafe.js

    r50f7a1a r756345b  
    66} 
    77 
     8// These functions need to be replaced with jquery modal dialogs 
     9function addConfirmLic(appname, origin, cmd, target, lictxt) { 
     10    if (confirm("You must accept the license agreement to continue:<br>" + lictxt) == true) { 
     11        var newURL = window.location.pathname + window.location.search; 
     12        window.location.href = newURL + "&installApp=" + origin + "&installAppCmd=" + cmd ; 
     13    } 
     14} 
     15 
     16// These functions need to be replaced with jquery modal dialogs 
    817function addConfirm(appname, origin, cmd, target) { 
    918    if (confirm("Are you sure you want to install " + appname + "?") == true) { 
  • src-webui/appweb/share/html/pages/appinfo.php

    r79ac1f5 r756345b  
    394394  global $pkgCmd; 
    395395 
    396    if ( $pbiInstalled ) 
     396   if ( $pbiInstalled ) { 
    397397     print("    <button title=\"Delete $pbiname from $jail\" style=\"background-color: Transparent;background-repeat:no-repeat;border: none;background-image: url('/images/application-exit.png');background-size: 100%; height: 48px; width: 48px;\" onclick=\"delConfirm('" . $pbiname ."','".rawurlencode($pbiorigin)."','".$pkgCmd."','".$jailUrl."')\" height=48 width=48></button>\n"); 
    398   else 
    399      print("    <button title=\"Install $pbiname into $jail\" style=\"background-color: Transparent;background-repeat:no-repeat;border: none;background-image: url('/images/install.png');background-size: 100%; height: 48px; width: 48px;\" onclick=\"addConfirm('" . $pbiname ."','".rawurlencode($pbiorigin)."','".$pkgCmd."','".$jailUrl."')\"></button>\n"); 
     398   } else { 
     399     global $pbiindexdir; 
     400     if ( file_exists("$pbiindexdir/$pbiorigin/LICENSE") ) { 
     401       // Read the license data 
     402       $pbilic = file_get_contents("$pbiindexdir/$pbiorigin/LICENSE"); 
     403       print("    <button title=\"Install $pbiname\" style=\"background-color: Transparent;background-repeat:no-repeat;border: none;\" onclick=\"addConfirmLic('" . $pbiname ."','".rawurlencode($pbiorigin)."','".$pkgCmd."','".$jailUrl."','".$pbilic."')\"><img src=\"/images/install.png\" height=48 width=48></button>\n"); 
     404     } else { 
     405       print("    <button title=\"Install $pbiname\" style=\"background-color: Transparent;background-repeat:no-repeat;border: none;\" onclick=\"addConfirm('" . $pbiname ."','".rawurlencode($pbiorigin)."','".$pkgCmd."','".$jailUrl."')\"><img src=\"/images/install.png\" height=48 width=48></button>\n"); 
     406     } 
     407  } 
    400408 
    401409} 
Note: See TracChangeset for help on using the changeset viewer.