diff --git a/HTML/css/tabs.css b/HTML/css/tabs.css index 0702afe96..f3b86f9a2 100644 --- a/HTML/css/tabs.css +++ b/HTML/css/tabs.css @@ -16,10 +16,34 @@ iframe { border: 0; } padding: 3px 0 0 0; } +#tabs .add a { + width: 12px; + height: 12px; + + margin-top: 2px; + margin-left: 10px; + padding: 2px; + + font-size: 15px; + font-weight: bold; + color: #fff; + text-shadow: #000 1px 1px 0; + background: #d8d7d8; + border: 1px solid #a0a0a0; + border-bottom: none; + + -webkit-border-top-right-radius: 10px 5px; + -webkit-border-top-left-radius: 10px 5px; + -webkit-box-shadow: inset 0 1px 0 white; +} +#tabs .add span { + display: block; + margin-top: -4px; +} + #tabs ul { list-style: none; border-bottom: 1px solid #a0a0a0; - } #tabs ul li { display: inline; } @@ -48,7 +72,6 @@ iframe { border: 0; } -webkit-border-top-right-radius: 10px 20px; -webkit-border-top-left-radius: 10px 20px; - -webkit-box-shadow: inset 1px 1px 0 white; border: 1px solid #a0a0a0; diff --git a/HTML/lib/atomicity.coffee b/HTML/lib/atomicity.coffee index 216f4874f..e8d8f0615 100644 --- a/HTML/lib/atomicity.coffee +++ b/HTML/lib/atomicity.coffee @@ -1,3 +1,5 @@ +# nice! + Chrome.init() editor = ace.edit "editor" diff --git a/HTML/lib/tabs.coffee b/HTML/lib/tabs.coffee index a4504787d..ed70811a5 100644 --- a/HTML/lib/tabs.coffee +++ b/HTML/lib/tabs.coffee @@ -16,11 +16,22 @@ if false $(this).removeAttr 'style' # events -$('#tabs ul a').click -> +$('#tabs ul li:not(.add) a').live 'click', -> $('#tabs ul .active').removeClass() $(this).parents('li').addClass 'active' idx = $('#tabs ul a').index this $('.content iframe').hide().eq(idx).show().focus() + false + +$('#tabs .add a').click -> + $('#tabs ul .active').removeClass() + $('#tabs ul .add').before '
  • untitled
  • ' + + $('.content iframe').hide() + $('.content').append '' + + $('#tabs ul .add').prev().addClass 'active' + false \ No newline at end of file diff --git a/HTML/tabs.html b/HTML/tabs.html index daf43ac89..e6bd23a8b 100644 --- a/HTML/tabs.html +++ b/HTML/tabs.html @@ -7,17 +7,12 @@
    - - -