includes/clientside/static/messagebox.js
changeset 832 7152ca0a0ce9
parent 811 5c807fe77020
child 854 7707f60d4a71
equal deleted inserted replaced
831:45e887f23282 832:7152ca0a0ce9
   522             for ( var j in button.style )
   522             for ( var j in button.style )
   523             {
   523             {
   524               button.input.style[j] = button.style[j];
   524               button.input.style[j] = button.style[j];
   525             }
   525             }
   526           }
   526           }
   527           if ( button.image )
   527           if ( button.sprite )
   528           {
   528           {
   529             button.input.className += ' abutton_img';
   529             var sprite = gen_sprite(button.sprite[0], button.sprite[1], button.sprite[2], button.sprite[3], button.sprite[4]);
       
   530             sprite.style.position = 'relative';
       
   531             sprite.style.top = '3px';
       
   532             button.input.insertBefore(sprite, button.input.firstChild);
       
   533             insertAfter(button.input, document.createTextNode(' '), sprite);
       
   534           }
       
   535           else if ( button.image )
       
   536           {
       
   537             button.input.className += ' icon';
   530             button.input.style.backgroundImage = 'url(' + button.image + ')';
   538             button.input.style.backgroundImage = 'url(' + button.image + ')';
   531           }
   539           }
   532           button.input.onclick = function(e)
   540           button.input.onclick = function(e)
   533           {
   541           {
   534             try
   542             try
   570         text: 'Abort',
   578         text: 'Abort',
   571         color: 'red',
   579         color: 'red',
   572         style: {
   580         style: {
   573           fontWeight: 'bold'
   581           fontWeight: 'bold'
   574         },
   582         },
   575         image: cdnPath + '/images/icons/abort.png',
   583         sprite: [ cdnPath + '/images/icons/abortretryignore-sprite.png', 16, 16, 0, 0 ],
   576         onclick: function() {
   584         onclick: function() {
   577           miniPromptDestroy(this);
   585           miniPromptDestroy(this);
   578         }
   586         }
   579       },
   587       },
   580       {
   588       {
   581         text: 'Retry',
   589         text: 'Retry',
   582         color: 'blue',
   590         color: 'blue',
   583         image: cdnPath + '/images/icons/retry.png',
   591         sprite: [ cdnPath + '/images/icons/abortretryignore-sprite.png', 16, 16, 0, 16 ],
   584         onclick: function() {
   592         onclick: function() {
   585           miniPromptDestroy(this);
   593           miniPromptDestroy(this);
   586         }
   594         }
   587       },
   595       },
   588       {
   596       {
   589         text: 'Ignore',
   597         text: 'Ignore',
   590         color: 'green',
   598         color: 'green',
   591         image: cdnPath + '/images/icons/ignore.png',
   599         sprite: [ cdnPath + '/images/icons/abortretryignore-sprite.png', 16, 16, 0, 32 ],
   592         onclick: function() {
   600         onclick: function() {
   593           miniPromptDestroy(this);
   601           miniPromptDestroy(this);
   594         }
   602         }
   595       }
   603       }
   596     ]
   604     ]