| OLD | NEW |
| 1 <!DOCTYPE HTML> | 1 <!DOCTYPE HTML> |
| 2 <html i18n-values="dir:textdirection;"> | 2 <html i18n-values="dir:textdirection;"> |
| 3 <head> | 3 <head> |
| 4 <meta charset="utf-8"> | 4 <meta charset="utf-8"> |
| 5 <title i18n-content="pluginsTitle"></title> | 5 <title i18n-content="pluginsTitle"></title> |
| 6 <style> | 6 <style> |
| 7 | 7 |
| 8 body { | 8 body { |
| 9 margin: 10px; | 9 margin: 10px; |
| 10 min-width: 47em; | 10 min-width: 47em; |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 padding-top: 0.8em; | 155 padding-top: 0.8em; |
| 156 width: 100%; | 156 width: 100%; |
| 157 } | 157 } |
| 158 | 158 |
| 159 html[dir=rtl] .tmi-mode { | 159 html[dir=rtl] .tmi-mode { |
| 160 padding-right: 10px; | 160 padding-right: 10px; |
| 161 padding-left: 0; | 161 padding-left: 0; |
| 162 } | 162 } |
| 163 | 163 |
| 164 .plugin-disabled > td { | 164 .plugin-disabled > td { |
| 165 background: url('gray.png') 0px 0px; | 165 background-color: #f0f0f0; |
| 166 color: #a0a0a0; | 166 color: #a0a0a0; |
| 167 padding-bottom: 4px; | 167 padding-bottom: 4px; |
| 168 padding-top: 5px; | 168 padding-top: 5px; |
| 169 } | 169 } |
| 170 | 170 |
| 171 .plugin-enabled > td { | 171 .plugin-enabled > td { |
| 172 padding-bottom: 4px; | 172 padding-bottom: 4px; |
| 173 padding-top: 5px; | 173 padding-top: 5px; |
| 174 } | 174 } |
| 175 | 175 |
| 176 .plugin-file-disabled { |
| 177 background-color: #f0f0f0; |
| 178 color: #a0a0a0; |
| 179 padding-top: 5px; |
| 180 padding-bottom: 5px; |
| 181 } |
| 182 |
| 183 .plugin-file-enabled { |
| 184 padding-top: 5px; |
| 185 padding-bottom: 5px; |
| 186 } |
| 187 |
| 176 .plugin { | 188 .plugin { |
| 177 border-bottom: 1px solid #cdcdcd; | 189 border-bottom: 1px solid #cdcdcd; |
| 178 } | 190 } |
| 179 | 191 |
| 192 .critical { |
| 193 color: red; |
| 194 } |
| 195 |
| 180 /* Indent the text related to each plug-in. */ | 196 /* Indent the text related to each plug-in. */ |
| 181 .plugin-text { | 197 .plugin-text { |
| 182 padding-left: 5px; | 198 padding-left: 5px; |
| 183 } | 199 } |
| 184 | 200 |
| 185 html[dir=rtl] .plugin-text { | 201 html[dir=rtl] .plugin-text { |
| 186 padding-right: 5px; | 202 padding-right: 5px; |
| 187 padding-left: 0; | 203 padding-left: 0; |
| 188 } | 204 } |
| 189 | 205 |
| 190 .plugin-name { | 206 .plugin-name { |
| 191 font-weight: bold; | 207 font-weight: bold; |
| 192 } | 208 } |
| 193 | 209 |
| 194 .no-plugins { | 210 .no-plugins { |
| 195 margin: 6em 0 0; | 211 margin: 6em 0 0; |
| 196 text-align: center; | 212 text-align: center; |
| 197 font-size: 1.2em; | 213 font-size: 1.2em; |
| 198 } | 214 } |
| 199 | 215 |
| 200 /* Use tables for layout, so eliminate extra spacing. */ | 216 /* Use tables for layout, so eliminate extra spacing. */ |
| 201 .plugin-details table { | 217 .plugin-details table { |
| 202 -webkit-border-horizontal-spacing: 0; | 218 -webkit-border-horizontal-spacing: 0; |
| 203 -webkit-border-vertical-spacing: 0; | 219 -webkit-border-vertical-spacing: 0; |
| 204 } | 220 } |
| 205 | 221 |
| 222 .plugin-details { |
| 223 -webkit-padding-start: 1em; |
| 224 } |
| 225 |
| 206 /* Separate the inital line, Description, Location, and MIME Types lines. */ | 226 /* Separate the inital line, Description, Location, and MIME Types lines. */ |
| 207 .plugin-details > div { | 227 .plugin-details > div { |
| 208 padding-top: 0.1em | 228 padding-top: 0.1em |
| 209 } | 229 } |
| 210 | 230 |
| 211 /* Align rows of tables along the top. */ | 231 /* Align rows of tables along the top. */ |
| 212 .plugin-details tr { | 232 .plugin-details tr { |
| 213 vertical-align: top; | 233 vertical-align: top; |
| 214 } | 234 } |
| 215 | 235 |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 263 </style> | 283 </style> |
| 264 <script> | 284 <script> |
| 265 | 285 |
| 266 /** | 286 /** |
| 267 * This variable structure is here to document the structure that the template | 287 * This variable structure is here to document the structure that the template |
| 268 * expects to correctly populate the page. | 288 * expects to correctly populate the page. |
| 269 */ | 289 */ |
| 270 var pluginDataFormat = { | 290 var pluginDataFormat = { |
| 271 'plugins': [ | 291 'plugins': [ |
| 272 { | 292 { |
| 273 'path': '/blahblah/blahblah/MyCrappyPlugin.plugin', | 293 'name': 'Group Name', |
| 274 'name': 'MyCrappyPlugin', | 294 'description': 'description', |
| 275 'version': '1.2.3', | 295 'version': 'version', |
| 276 'description': 'My crappy plugin', | 296 'update_url': 'http://update/', |
| 277 'mimeTypes': [ | 297 'critical': true, |
| 278 { 'description': 'Foo Media', | 298 'enabled': true, |
| 279 'fileExtensions': [ 'foo' ], | 299 'plugin_files': [ |
| 280 'mimeType': 'application/x-my-foo' }, | 300 { |
| 281 { 'description': 'Bar Stuff', | 301 'path': '/blahblah/blahblah/MyCrappyPlugin.plugin', |
| 282 'fileExtensions': [ 'bar','baz' ], | 302 'name': 'MyCrappyPlugin', |
| 283 'mimeType': 'application/my-bar' } | 303 'version': '1.2.3', |
| 284 ], | 304 'description': 'My crappy plugin', |
| 285 'enabled': true | 305 'mimeTypes': [ |
| 286 }, | 306 { 'description': 'Foo Media', |
| 287 { | 307 'fileExtensions': [ 'foo' ], |
| 288 'path': '/foobar/baz/YourGreatPlugin.plugin', | 308 'mimeType': 'application/x-my-foo' }, |
| 289 'name': 'YourGreatPlugin', | 309 { 'description': 'Bar Stuff', |
| 290 'version': '4.5', | 310 'fileExtensions': [ 'bar','baz' ], |
| 291 'description': 'Your great plugin', | 311 'mimeType': 'application/my-bar' } |
| 292 'mimeTypes': [ | 312 ], |
| 293 { 'description': 'Baz Stuff', | 313 'enabled': true |
| 294 'fileExtensions': [ 'baz' ], | 314 }, |
| 295 'mimeType': 'application/x-your-baz' } | 315 { |
| 296 ], | 316 'path': '/foobar/baz/YourGreatPlugin.plugin', |
| 297 'enabled': false | 317 'name': 'YourGreatPlugin', |
| 318 'version': '4.5', |
| 319 'description': 'Your great plugin', |
| 320 'mimeTypes': [ |
| 321 { 'description': 'Baz Stuff', |
| 322 'fileExtensions': [ 'baz' ], |
| 323 'mimeType': 'application/x-your-baz' } |
| 324 ], |
| 325 'enabled': false |
| 326 } |
| 327 ] |
| 298 } | 328 } |
| 299 ] | 329 ] |
| 300 }; | 330 }; |
| 301 | 331 |
| 302 /** | 332 /** |
| 303 * Takes the |pluginsData| input argument which represents data about the | 333 * Takes the |pluginsData| input argument which represents data about the |
| 304 * currently installed/running plugins and populates the html jstemplate with | 334 * currently installed/running plugins and populates the html jstemplate with |
| 305 * that data. It expects an object structure like the above. | 335 * that data. It expects an object structure like the above. |
| 306 * @param {Object} pluginsData Detailed info about installed plugins | 336 * @param {Object} pluginsData Detailed info about installed plugins |
| 307 */ | 337 */ |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 368 document.getElementById('expand').style.display = | 398 document.getElementById('expand').style.display = |
| 369 tmiModeExpanded ? 'none' : 'inline'; | 399 tmiModeExpanded ? 'none' : 'inline'; |
| 370 bodyContainer.style.visibility = 'visible'; | 400 bodyContainer.style.visibility = 'visible'; |
| 371 body.className = tmiModeExpanded ? | 401 body.className = tmiModeExpanded ? |
| 372 'showTmiModeInitial' : 'hideTmiModeInitial'; | 402 'showTmiModeInitial' : 'hideTmiModeInitial'; |
| 373 } | 403 } |
| 374 | 404 |
| 375 /** | 405 /** |
| 376 * Handles a 'enable' or 'disable' button getting clicked. | 406 * Handles a 'enable' or 'disable' button getting clicked. |
| 377 */ | 407 */ |
| 378 function handleEnablePlugin(node, enable) { | 408 function handleEnablePlugin(node, enable, isGroup) { |
| 379 // Tell the C++ PluginsDOMHandler to enable/disable the plugin. | 409 // Tell the C++ PluginsDOMHandler to enable/disable the plugin. |
| 380 chrome.send('enablePlugin', [node.pluginPath, String(enable)]); | 410 chrome.send('enablePlugin', [String(node.path), String(enable), |
| 411 String(isGroup)]); |
| 381 requestPluginsData(); | 412 requestPluginsData(); |
| 382 } | 413 } |
| 383 | 414 |
| 384 // Keeps track of whether details have been made visible (expanded) or not. | 415 // Keeps track of whether details have been made visible (expanded) or not. |
| 385 var tmiModeExpanded = false; | 416 var tmiModeExpanded = false; |
| 386 | 417 |
| 387 /* | 418 /* |
| 388 * Toggles visibility of details. | 419 * Toggles visibility of details. |
| 389 */ | 420 */ |
| 390 function toggleTmiMode() { | 421 function toggleTmiMode() { |
| 391 tmiModeExpanded = !tmiModeExpanded; | 422 tmiModeExpanded = !tmiModeExpanded; |
| 392 | 423 |
| 393 document.getElementById('collapse').style.display = | 424 document.getElementById('collapse').style.display = |
| 394 tmiModeExpanded ? 'inline' : 'none'; | 425 tmiModeExpanded ? 'inline' : 'none'; |
| 395 document.getElementById('expand').style.display = | 426 document.getElementById('expand').style.display = |
| 396 tmiModeExpanded ? 'none' : 'inline'; | 427 tmiModeExpanded ? 'none' : 'inline'; |
| 397 | 428 |
| 398 document.body.className = | 429 document.body.className = |
| 399 tmiModeExpanded ? 'showTmiMode' : 'hideTmiMode'; | 430 tmiModeExpanded ? 'showTmiMode' : 'hideTmiMode'; |
| 400 } | 431 } |
| 401 | 432 |
| 402 /** | 433 /** |
| 403 * Determines whether a plugin's version should be displayed. | 434 * Determines whether a plugin's version should be displayed. |
| 404 */ | 435 */ |
| 405 function shouldDisplayPluginVersion(plugin) { | 436 function shouldDisplayPluginVersion(plugin) { |
| 406 return !!plugin.version; | 437 return !!plugin.version && plugin.version != '0'; |
| 407 } | 438 } |
| 408 | 439 |
| 409 /** | 440 /** |
| 410 * Determines whether a plugin's description should be displayed. | 441 * Determines whether a plugin's description should be displayed. |
| 411 */ | 442 */ |
| 412 function shouldDisplayPluginDescription(plugin) { | 443 function shouldDisplayPluginDescription(plugin) { |
| 413 // Only display the description if it's not blank and if it's not just the | 444 // Only display the description if it's not blank and if it's not just the |
| 414 // name, version, or combination thereof. | 445 // name, version, or combination thereof. |
| 415 return plugin.description && | 446 return plugin.description && |
| 416 plugin.description != plugin.name && | 447 plugin.description != plugin.name && |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 473 | 504 |
| 474 <div jsdisplay="plugins.length > 0"> | 505 <div jsdisplay="plugins.length > 0"> |
| 475 <div class="plugin" jsselect="plugins"> | 506 <div class="plugin" jsselect="plugins"> |
| 476 <table width="100%" cellpadding="2" cellspacing="0"> | 507 <table width="100%" cellpadding="2" cellspacing="0"> |
| 477 <tr jsvalues= | 508 <tr jsvalues= |
| 478 ".className:enabled ? 'plugin-enabled' : 'plugin-disabled'"> | 509 ".className:enabled ? 'plugin-enabled' : 'plugin-disabled'"> |
| 479 <td valign="top"> | 510 <td valign="top"> |
| 480 <div class="plugin-text"> | 511 <div class="plugin-text"> |
| 481 <div> | 512 <div> |
| 482 <span class="plugin-name" dir="ltr" | 513 <span class="plugin-name" dir="ltr" |
| 483 jscontent="name">PLUGIN NAME</span> | 514 jscontent="name">NAME</span> |
| 515 <span jsdisplay="plugin_files.length > 1" |
| 516 jscontent="'(' + plugin_files.length +' files)'">(x)</span> |
| 484 <span jsdisplay="shouldDisplayPluginVersion($this)"> | 517 <span jsdisplay="shouldDisplayPluginVersion($this)"> |
| 485 - <span i18n-content="pluginVersion">VERSION</span> | 518 - <span i18n-content="pluginVersion">VERSION</span> |
| 486 <span dir="ltr" jscontent="version">x.x.x.x</span> | 519 <span jsvalues=".className:critical? 'critical': ''" |
| 520 dir="ltr" jscontent="version">x.x.x.x</span> |
| 487 </span> | 521 </span> |
| 522 <a jsdisplay="critical" jsvalues=".href:update_url" |
| 523 i18n-content="pluginDownload">DOWNLOAD UPDATE</a> |
| 488 <span jsdisplay="!enabled" | 524 <span jsdisplay="!enabled" |
| 489 i18n-content="pluginDisabled">(DISABLED)</span> | 525 i18n-content="pluginDisabled">(DISABLED)</span> |
| 526 <div jsdisplay="shouldDisplayPluginDescription($this)"> |
| 527 <span dir="ltr" jsvalues=".innerHTML:description"> |
| 528 </div> |
| 490 </div> | 529 </div> |
| 491 <div class="plugin-details"> | 530 <div jsselect="plugin_files" class="plugin-details"> |
| 492 <div><table><tr jsdisplay="shouldDisplayPluginDescription($this)"> | |
| 493 <td class="plugin-details-label" | |
| 494 i18n-content="pluginDescription">DESCRIPTION:</td> | |
| 495 <td><span dir="ltr" jsvalues=".innerHTML:description"></td> | |
| 496 </tr></table></div> | |
| 497 <div><table><tr> | |
| 498 <td class="plugin-details-label" | |
| 499 i18n-content="pluginPath">PATH:</td> | |
| 500 <td><span dir="ltr" jscontent="path"></span></td> | |
| 501 </tr></table></div> | |
| 502 <div class="showInTmiMode"> | 531 <div class="showInTmiMode"> |
| 503 <table><tr jsdisplay="mimeTypes.length > 0"> | 532 <div jsvalues= |
| 504 <td class="plugin-details-label" | 533 ".className:enabled ? 'plugin-file-enabled' : 'plugin-file-dis
abled'"> |
| 505 i18n-content="pluginMimeTypes">MIME_TYPES:</td> | 534 <div><table><tr> |
| 506 <td><table width="100%" class="mime-types"> | 535 <td class="plugin-details-label" |
| 507 <tr class="header"> | 536 i18n-content="pluginName">NAME:</td> |
| 508 <td i18n-content="pluginMimeTypesMimeType" | 537 <td><span dir="ltr" jscontent="name">NAME</span></td> |
| 509 >MIME type</td> | 538 </tr></table></div> |
| 510 <td i18n-content="pluginMimeTypesDescription" | 539 <div><table><tr jsdisplay="shouldDisplayPluginDescription($thi
s)"> |
| 511 >DESCRIPTION</td> | 540 <td class="plugin-details-label" |
| 512 <td i18n-content="pluginMimeTypesFileExtensions" | 541 i18n-content="pluginDescription">DESCRIPTION:</td> |
| 513 >FILE_EXTENSIONS</td> | 542 <td><span dir="ltr" jsvalues=".innerHTML:description"></td> |
| 514 </tr> | 543 </tr></table></div> |
| 515 <tr jsselect="mimeTypes"> | 544 <div><table><tr> |
| 516 <td><span dir="ltr" | 545 <td class="plugin-details-label" |
| 517 jscontent="mimeType"></span></td> | 546 i18n-content="pluginVersion">VERSION:</td> |
| 518 <td><span dir="ltr" | 547 <td><span dir="ltr" jscontent="version">x.x.x.x</span></td> |
| 519 jsvalues=".innerHTML:description"></span></td> | 548 </tr></table></div> |
| 520 <td><table jsdisplay="fileExtensions.length > 0" | 549 <div><table><tr> |
| 521 class="hlisting"> | 550 <td class="plugin-details-label" |
| 522 <tr><td jsselect="fileExtensions"> | 551 i18n-content="pluginPriority">PRIORITY:</td> |
| 523 <span dir="ltr" jscontent="'.' + $this"> | 552 <td><span dir="ltr" jscontent="priority">x</span></td> |
| 524 </td></tr> | 553 </tr></table></div> |
| 525 </table></td> | 554 <div><table><tr> |
| 526 </tr> | 555 <td class="plugin-details-label" |
| 527 </table></td> | 556 i18n-content="pluginPath">PATH:</td> |
| 528 </tr></table> | 557 <td><span dir="ltr" jscontent="path"></span></td> |
| 558 </tr></table></div> |
| 559 <div><table><tr> |
| 560 <td class="plugin-details-label"> </td> |
| 561 <td> |
| 562 <span jsdisplay="!enabled" |
| 563 i18n-content="pluginDisabled">(DISABLED)</span> |
| 564 <span> |
| 565 <a |
| 566 jsvalues=".path:path" |
| 567 jsdisplay="enabled" |
| 568 onclick="handleEnablePlugin(this, false, false)" |
| 569 href="javascript:void(0);" |
| 570 i18n-content="disable" |
| 571 >DISABLE</a> |
| 572 <a |
| 573 jsvalues=".path:path" |
| 574 jsdisplay="!enabled" |
| 575 onclick="handleEnablePlugin(this, true, false)" |
| 576 href="javascript:void(0);" |
| 577 i18n-content="enable" |
| 578 >ENABLE</a> |
| 579 </span> |
| 580 </td> |
| 581 </tr></table></div> |
| 582 <table><tr jsdisplay="mimeTypes.length > 0"> |
| 583 <td class="plugin-details-label" |
| 584 i18n-content="pluginMimeTypes">MIME_TYPES:</td> |
| 585 <td><table width="100%" class="mime-types"> |
| 586 <tr class="header"> |
| 587 <td i18n-content="pluginMimeTypesMimeType" |
| 588 >MIME type</td> |
| 589 <td i18n-content="pluginMimeTypesDescription" |
| 590 >DESCRIPTION</td> |
| 591 <td i18n-content="pluginMimeTypesFileExtensions" |
| 592 >FILE_EXTENSIONS</td> |
| 593 </tr> |
| 594 <tr jsselect="mimeTypes"> |
| 595 <td><span dir="ltr" |
| 596 jscontent="mimeType"></span></td> |
| 597 <td><span dir="ltr" |
| 598 jsvalues=".innerHTML:description"></span></td> |
| 599 <td><table jsdisplay="fileExtensions.length > 0" |
| 600 class="hlisting"> |
| 601 <tr><td jsselect="fileExtensions"> |
| 602 <span dir="ltr" jscontent="'.' + $this"> |
| 603 </td></tr> |
| 604 </table></td> |
| 605 </tr> |
| 606 </table></td> |
| 607 </tr></table> |
| 608 </div> |
| 529 </div> | 609 </div> |
| 530 </div> | 610 </div> |
| 531 </div> | 611 </div> |
| 532 | |
| 533 <div class="plugin-actions"> | 612 <div class="plugin-actions"> |
| 534 <span> | 613 <span> |
| 535 <a | 614 <a |
| 536 jsvalues=".pluginPath:path" | 615 jsvalues=".path:name" |
| 537 jsdisplay="enabled" | 616 jsdisplay="enabled" |
| 538 onclick="handleEnablePlugin(this, false)" | 617 onclick="handleEnablePlugin(this, false, true)" |
| 539 href="javascript:void();" | 618 href="javascript:void(0);" |
| 540 i18n-content="disable" | 619 i18n-content="disable" |
| 541 >DISABLE</a> | 620 >DISABLE</a> |
| 542 <a | 621 <a |
| 543 jsvalues=".pluginPath:path" | 622 jsvalues=".path:name" |
| 544 jsdisplay="!enabled" | 623 jsdisplay="!enabled" |
| 545 onclick="handleEnablePlugin(this, true)" | 624 onclick="handleEnablePlugin(this, true, true)" |
| 546 href="javascript:void();" | 625 href="javascript:void(0);" |
| 547 i18n-content="enable" | 626 i18n-content="enable" |
| 548 >ENABLE</a> | 627 >ENABLE</a> |
| 549 </span> | 628 </span> |
| 550 </div> | 629 </div> |
| 551 </td> | 630 </td> |
| 552 </tr> | 631 </tr> |
| 553 </table> | 632 </table> |
| 554 </div> | 633 </div> |
| 555 </div> | 634 </div> |
| 556 </div> | 635 </div> |
| 557 </div> | 636 </div> |
| 558 </div> | 637 </div> |
| 559 </body> | 638 </body> |
| 560 </html> | 639 </html> |
| OLD | NEW |