From cad0266dbc626793d9d6c36f44a12dff33f88eca Mon Sep 17 00:00:00 2001 From: Jinhyuk Jun Date: Tue, 11 Dec 2012 11:09:42 +0900 Subject: [PATCH] replace controlbar to tabbar Change-Id: Ieaa59904fc4585545e28e69d9acd45aa7b1c7380 Conflicts: demos/tizen-winsets/index.html --- demos/tizen-winsets/index.html | 45 +-- .../tips/list-sample/list-sample.html | 10 +- .../widgets/controlbar/controlbar.html | 448 --------------------- .../widgets/controlbar/controlbar_title_icon.html | 31 -- demos/tizen-winsets/widgets/gallery.html | 2 +- .../pagelayout/{ctrl-test.html => tab-test.html} | 10 +- .../pagelayout/{ctrl-test.js => tab-test.js} | 4 +- .../tizen-winsets/widgets/tabbar/00_tab_edit.png | Bin .../widgets/tabbar/00_tab_edit_press.png | Bin demos/tizen-winsets/widgets/tabbar/tabbar.css | 5 + demos/tizen-winsets/widgets/tabbar/tabbar.html | 44 ++ .../tabbar_footer.html} | 4 +- .../tabbar_footer_icon.html} | 10 +- .../tabbar_footer_more.html} | 4 +- .../tabbar_footer_segment.html} | 2 +- .../tabbar_footer_segment_more.html} | 2 +- .../tabbar_icon.html} | 8 +- .../tabbar_icon_text.html} | 8 +- .../tabbar_scrolling.html} | 2 +- .../tabbar_text.html} | 2 +- .../widgets/tabbar/tabbar_title_icon.html | 31 ++ .../tabbar_title_text.html} | 4 +- src/themes/tizen/common/jquery.mobile.theme.less | 2 +- ...rolbar.less => jquery.mobile.tizen.tabbar.less} | 68 ++-- src/themes/tizen/tizen-white/Makefile | 2 +- src/themes/tizen/tizen-white/style.less | 8 +- .../js/jquery.mobile.tizen.tabbar.js} | 110 ++--- tests/unit-tests/controlbar/controlbar-tests.js | 53 --- tests/unit-tests/controlbar/index.html | 83 ---- .../segmentcontrol/segmentcontrol-tests.js | 2 +- tests/unit-tests/tabbar/index.html | 45 +++ tests/unit-tests/tabbar/tabbar-tests.js | 45 +++ tests/unit-tests/tests.js | 2 +- 33 files changed, 320 insertions(+), 776 deletions(-) mode change 100644 => 100755 demos/tizen-winsets/tips/list-sample/list-sample.html delete mode 100755 demos/tizen-winsets/widgets/controlbar/controlbar.html delete mode 100755 demos/tizen-winsets/widgets/controlbar/controlbar_title_icon.html mode change 100644 => 100755 demos/tizen-winsets/widgets/gallery.html rename demos/tizen-winsets/widgets/pagelayout/{ctrl-test.html => tab-test.html} (68%) rename demos/tizen-winsets/widgets/pagelayout/{ctrl-test.js => tab-test.js} (54%) rename src/themes/tizen/tizen-white/images/controlbar/00_ctrl_edit.png => demos/tizen-winsets/widgets/tabbar/00_tab_edit.png (100%) rename src/themes/tizen/tizen-white/images/controlbar/00_ctrl_edit_press.png => demos/tizen-winsets/widgets/tabbar/00_tab_edit_press.png (100%) create mode 100755 demos/tizen-winsets/widgets/tabbar/tabbar.css create mode 100755 demos/tizen-winsets/widgets/tabbar/tabbar.html rename demos/tizen-winsets/widgets/{controlbar/controlbar_footer.html => tabbar/tabbar_footer.html} (90%) rename demos/tizen-winsets/widgets/{controlbar/controlbar_footer_icon.html => tabbar/tabbar_footer_icon.html} (69%) rename demos/tizen-winsets/widgets/{controlbar/controlbar_footer_more.html => tabbar/tabbar_footer_more.html} (91%) rename demos/tizen-winsets/widgets/{controlbar/controlbar_footer_segment.html => tabbar/tabbar_footer_segment.html} (95%) rename demos/tizen-winsets/widgets/{controlbar/controlbar_footer_segment_more.html => tabbar/tabbar_footer_segment_more.html} (97%) rename demos/tizen-winsets/widgets/{controlbar/controlbar_icon.html => tabbar/tabbar_icon.html} (71%) rename demos/tizen-winsets/widgets/{controlbar/controlbar_icon_text.html => tabbar/tabbar_icon_text.html} (70%) rename demos/tizen-winsets/widgets/{controlbar/controlbar_scrolling.html => tabbar/tabbar_scrolling.html} (96%) rename demos/tizen-winsets/widgets/{controlbar/controlbar_text.html => tabbar/tabbar_text.html} (95%) create mode 100755 demos/tizen-winsets/widgets/tabbar/tabbar_title_icon.html rename demos/tizen-winsets/widgets/{controlbar/controlbar_title_text.html => tabbar/tabbar_title_text.html} (90%) rename src/themes/tizen/common/{jquery.mobile.tizen.controlbar.less => jquery.mobile.tizen.tabbar.less} (64%) rename src/widgets/{controlbar/js/jquery.mobile.tizen.controlbar.js => tabbar/js/jquery.mobile.tizen.tabbar.js} (51%) delete mode 100755 tests/unit-tests/controlbar/controlbar-tests.js delete mode 100755 tests/unit-tests/controlbar/index.html create mode 100755 tests/unit-tests/tabbar/index.html create mode 100755 tests/unit-tests/tabbar/tabbar-tests.js mode change 100644 => 100755 tests/unit-tests/tests.js diff --git a/demos/tizen-winsets/index.html b/demos/tizen-winsets/index.html index 936a807..bc8f22c 100755 --- a/demos/tizen-winsets/index.html +++ b/demos/tizen-winsets/index.html @@ -67,9 +67,9 @@
  • Header/Footer(fixed/non-fixed) Control
  • Back Button Control
  • -
  • Controlbar
  • -
  • Controlbar
  • -
  • Persist toolbar
  • +
  • Tabbar
  • +
  • Tabbar
  • +
  • Persist toolbar
  • Scrollview
  • Horizontal Scroll
  • @@ -117,15 +117,15 @@ -
    +
    -
    +
    -
    +
    @@ -133,15 +133,15 @@
    -
    +
    -
    +
    -
    +
    @@ -149,15 +149,15 @@
    -
    +
    -
    +
    -
    +
    @@ -279,8 +279,7 @@ - - + diff --git a/demos/tizen-winsets/tips/list-sample/list-sample.html b/demos/tizen-winsets/tips/list-sample/list-sample.html old mode 100644 new mode 100755 index 4179413..da00aa5 --- a/demos/tizen-winsets/tips/list-sample/list-sample.html +++ b/demos/tizen-winsets/tips/list-sample/list-sample.html @@ -9,12 +9,12 @@
    - diff --git a/demos/tizen-winsets/widgets/controlbar/controlbar.html b/demos/tizen-winsets/widgets/controlbar/controlbar.html deleted file mode 100755 index a971e2b..0000000 --- a/demos/tizen-winsets/widgets/controlbar/controlbar.html +++ /dev/null @@ -1,448 +0,0 @@ - - - - - - - - - - - - - - - - - - - -
    -
    -

    ControlBar

    -
    -
    - -
    -
    - - - -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    -
    -
    -
    -

    Tabbar

    -
    -
    - -
    -
    -
    - -
    -
    -
    - -
    -
    -

    Tabbar

    -
    -
    - -
    -
    -
    - -
    -
    -
    - -
    -
    -

    Tabbar

    -
    -
    - -
    -
    -
    - -
    -
    -
    - -
    -
    -

    Tabbar

    -
    -
    - -
    -
    -
    - -
    -
    -
    - -
    -
    -

    Tabbar

    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    - -
    -
    -

    Tabbar

    -
    -
    -
    - -
    -
    -
    -
    -
      -
    • -
    • -
    • -
    • -
    • -
    -
    -
    -
    - - - - -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    -
    -
    - - -
    -
    -

    Toolbar

    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    - -
    -
    -

    Toolbar

    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    - -
    -
    -

    Toolbar

    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    - -
    -
    -

    Toolbar

    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    - -
    -
    -

    Toolbar

    -
    -
    -
    - -
    -
    -
    -
    - -
    -
    -
    - -
    -
    -

    Toolbar

    -
    -
    -
    - -
    -
    -
    -
    -
      -
    • -
    • -
    • -
    • -
    • -
    -
    -
    -
    - - - - - diff --git a/demos/tizen-winsets/widgets/controlbar/controlbar_title_icon.html b/demos/tizen-winsets/widgets/controlbar/controlbar_title_icon.html deleted file mode 100755 index 91b099e..0000000 --- a/demos/tizen-winsets/widgets/controlbar/controlbar_title_icon.html +++ /dev/null @@ -1,31 +0,0 @@ - - - - - - - - - - - - - -
    -
    -

    Controlbar icon with title

    -
    -
      -
    • -
    • -
    • -
    -
    -
    - -
    -
    -
    - - - diff --git a/demos/tizen-winsets/widgets/gallery.html b/demos/tizen-winsets/widgets/gallery.html old mode 100644 new mode 100755 index 1090c92..22dc1a9 --- a/demos/tizen-winsets/widgets/gallery.html +++ b/demos/tizen-winsets/widgets/gallery.html @@ -17,7 +17,7 @@
    -
    +
      diff --git a/demos/tizen-winsets/widgets/pagelayout/ctrl-test.html b/demos/tizen-winsets/widgets/pagelayout/tab-test.html similarity index 68% rename from demos/tizen-winsets/widgets/pagelayout/ctrl-test.html rename to demos/tizen-winsets/widgets/pagelayout/tab-test.html index 9fc408b..da9b1cc 100755 --- a/demos/tizen-winsets/widgets/pagelayout/ctrl-test.html +++ b/demos/tizen-winsets/widgets/pagelayout/tab-test.html @@ -6,7 +6,7 @@
    @@ -25,11 +25,11 @@
    -
    +
    diff --git a/demos/tizen-winsets/widgets/pagelayout/ctrl-test.js b/demos/tizen-winsets/widgets/pagelayout/tab-test.js similarity index 54% rename from demos/tizen-winsets/widgets/pagelayout/ctrl-test.js rename to demos/tizen-winsets/widgets/pagelayout/tab-test.js index 826a032..e6040a6 100755 --- a/demos/tizen-winsets/widgets/pagelayout/ctrl-test.js +++ b/demos/tizen-winsets/widgets/pagelayout/tab-test.js @@ -1,6 +1,6 @@ /* test file for content div control, not completed yet */ $( "#ctrlbar_5item" ).live( "click", function() { var a; - $("#ctrlbar_5item").controlbar('enable', a); - $("#ctrlbar_5item").controlbar('disable', undefined); + $("#ctrlbar_5item").tabbar('enable', a); + $("#ctrlbar_5item").tabbar('disable', undefined); }); diff --git a/src/themes/tizen/tizen-white/images/controlbar/00_ctrl_edit.png b/demos/tizen-winsets/widgets/tabbar/00_tab_edit.png similarity index 100% rename from src/themes/tizen/tizen-white/images/controlbar/00_ctrl_edit.png rename to demos/tizen-winsets/widgets/tabbar/00_tab_edit.png diff --git a/src/themes/tizen/tizen-white/images/controlbar/00_ctrl_edit_press.png b/demos/tizen-winsets/widgets/tabbar/00_tab_edit_press.png similarity index 100% rename from src/themes/tizen/tizen-white/images/controlbar/00_ctrl_edit_press.png rename to demos/tizen-winsets/widgets/tabbar/00_tab_edit_press.png diff --git a/demos/tizen-winsets/widgets/tabbar/tabbar.css b/demos/tizen-winsets/widgets/tabbar/tabbar.css new file mode 100755 index 0000000..858bd48 --- /dev/null +++ b/demos/tizen-winsets/widgets/tabbar/tabbar.css @@ -0,0 +1,5 @@ +.ui-btn-up-s .ui-icon-tabedit {.tizen-icon-common; background-image: url(00_tab_edit.png); } + +.ui-btn-hover-s .ui-icon-tabedit, +.ui-btn-active.ui-btn-up-s .ui-icon-tabedit, +.ui-btn-down-s .ui-icon-tabedit {.tizen-icon-common; background-image: url(00_tab_edit_press.png); } diff --git a/demos/tizen-winsets/widgets/tabbar/tabbar.html b/demos/tizen-winsets/widgets/tabbar/tabbar.html new file mode 100755 index 0000000..749126b --- /dev/null +++ b/demos/tizen-winsets/widgets/tabbar/tabbar.html @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + diff --git a/demos/tizen-winsets/widgets/controlbar/controlbar_footer.html b/demos/tizen-winsets/widgets/tabbar/tabbar_footer.html similarity index 90% rename from demos/tizen-winsets/widgets/controlbar/controlbar_footer.html rename to demos/tizen-winsets/widgets/tabbar/tabbar_footer.html index fd14893..ba40f1f 100755 --- a/demos/tizen-winsets/widgets/controlbar/controlbar_footer.html +++ b/demos/tizen-winsets/widgets/tabbar/tabbar_footer.html @@ -12,14 +12,14 @@
    -

    Controlbar text with title

    +

    Tabbar text with title

    -
    +
    • Menu
    • Save
    • diff --git a/demos/tizen-winsets/widgets/controlbar/controlbar_footer_icon.html b/demos/tizen-winsets/widgets/tabbar/tabbar_footer_icon.html similarity index 69% rename from demos/tizen-winsets/widgets/controlbar/controlbar_footer_icon.html rename to demos/tizen-winsets/widgets/tabbar/tabbar_footer_icon.html index 05f54f1..279fd5c 100755 --- a/demos/tizen-winsets/widgets/controlbar/controlbar_footer_icon.html +++ b/demos/tizen-winsets/widgets/tabbar/tabbar_footer_icon.html @@ -12,18 +12,18 @@
      -

      Controlbar text with title

      +

      Tabbar text with title

      -
      +
        -
      • -
      • -
      • +
      • +
      • +
      diff --git a/demos/tizen-winsets/widgets/controlbar/controlbar_footer_more.html b/demos/tizen-winsets/widgets/tabbar/tabbar_footer_more.html similarity index 91% rename from demos/tizen-winsets/widgets/controlbar/controlbar_footer_more.html rename to demos/tizen-winsets/widgets/tabbar/tabbar_footer_more.html index 45670ba..cceab6c 100755 --- a/demos/tizen-winsets/widgets/controlbar/controlbar_footer_more.html +++ b/demos/tizen-winsets/widgets/tabbar/tabbar_footer_more.html @@ -13,7 +13,7 @@
      -

      Controlbar text with title

      +

      Tabbar text with title

      @@ -21,7 +21,7 @@
      -
      +
      • Menu
      • Save
      • diff --git a/demos/tizen-winsets/widgets/controlbar/controlbar_footer_segment.html b/demos/tizen-winsets/widgets/tabbar/tabbar_footer_segment.html similarity index 95% rename from demos/tizen-winsets/widgets/controlbar/controlbar_footer_segment.html rename to demos/tizen-winsets/widgets/tabbar/tabbar_footer_segment.html index 5c7434a..7837e4e 100755 --- a/demos/tizen-winsets/widgets/controlbar/controlbar_footer_segment.html +++ b/demos/tizen-winsets/widgets/tabbar/tabbar_footer_segment.html @@ -12,7 +12,7 @@
        -

        Controlbar text with title

        +

        Tabbar text with title

        diff --git a/demos/tizen-winsets/widgets/controlbar/controlbar_footer_segment_more.html b/demos/tizen-winsets/widgets/tabbar/tabbar_footer_segment_more.html similarity index 97% rename from demos/tizen-winsets/widgets/controlbar/controlbar_footer_segment_more.html rename to demos/tizen-winsets/widgets/tabbar/tabbar_footer_segment_more.html index 3ef57ce..d313380 100755 --- a/demos/tizen-winsets/widgets/controlbar/controlbar_footer_segment_more.html +++ b/demos/tizen-winsets/widgets/tabbar/tabbar_footer_segment_more.html @@ -12,7 +12,7 @@
        -

        Controlbar text with title

        +

        Tabbar text with title

        diff --git a/demos/tizen-winsets/widgets/controlbar/controlbar_icon.html b/demos/tizen-winsets/widgets/tabbar/tabbar_icon.html similarity index 71% rename from demos/tizen-winsets/widgets/controlbar/controlbar_icon.html rename to demos/tizen-winsets/widgets/tabbar/tabbar_icon.html index 37fdb55..5306417 100755 --- a/demos/tizen-winsets/widgets/controlbar/controlbar_icon.html +++ b/demos/tizen-winsets/widgets/tabbar/tabbar_icon.html @@ -13,11 +13,11 @@
        -
        +
          -
        • -
        • -
        • +
        • +
        • +
        diff --git a/demos/tizen-winsets/widgets/controlbar/controlbar_icon_text.html b/demos/tizen-winsets/widgets/tabbar/tabbar_icon_text.html similarity index 70% rename from demos/tizen-winsets/widgets/controlbar/controlbar_icon_text.html rename to demos/tizen-winsets/widgets/tabbar/tabbar_icon_text.html index 133e0e4..cc9700d 100755 --- a/demos/tizen-winsets/widgets/controlbar/controlbar_icon_text.html +++ b/demos/tizen-winsets/widgets/tabbar/tabbar_icon_text.html @@ -13,11 +13,11 @@
        -
        +
        diff --git a/demos/tizen-winsets/widgets/controlbar/controlbar_scrolling.html b/demos/tizen-winsets/widgets/tabbar/tabbar_scrolling.html similarity index 96% rename from demos/tizen-winsets/widgets/controlbar/controlbar_scrolling.html rename to demos/tizen-winsets/widgets/tabbar/tabbar_scrolling.html index 6cf49ab..2de714c 100755 --- a/demos/tizen-winsets/widgets/controlbar/controlbar_scrolling.html +++ b/demos/tizen-winsets/widgets/tabbar/tabbar_scrolling.html @@ -13,7 +13,7 @@
        -
        +
        • Menu
        • Save
        • diff --git a/demos/tizen-winsets/widgets/controlbar/controlbar_text.html b/demos/tizen-winsets/widgets/tabbar/tabbar_text.html similarity index 95% rename from demos/tizen-winsets/widgets/controlbar/controlbar_text.html rename to demos/tizen-winsets/widgets/tabbar/tabbar_text.html index e8913bb..4d52421 100755 --- a/demos/tizen-winsets/widgets/controlbar/controlbar_text.html +++ b/demos/tizen-winsets/widgets/tabbar/tabbar_text.html @@ -13,7 +13,7 @@
          -
          +
          • Menu
          • Save
          • diff --git a/demos/tizen-winsets/widgets/tabbar/tabbar_title_icon.html b/demos/tizen-winsets/widgets/tabbar/tabbar_title_icon.html new file mode 100755 index 0000000..0e047d9 --- /dev/null +++ b/demos/tizen-winsets/widgets/tabbar/tabbar_title_icon.html @@ -0,0 +1,31 @@ + + + + + + + + + + + + + +
            +
            +

            Tabbar icon with title

            +
            +
              +
            • +
            • +
            • +
            +
            +
            + +
            +
            +
            + + + diff --git a/demos/tizen-winsets/widgets/controlbar/controlbar_title_text.html b/demos/tizen-winsets/widgets/tabbar/tabbar_title_text.html similarity index 90% rename from demos/tizen-winsets/widgets/controlbar/controlbar_title_text.html rename to demos/tizen-winsets/widgets/tabbar/tabbar_title_text.html index bdcf446..ab737b0 100755 --- a/demos/tizen-winsets/widgets/controlbar/controlbar_title_text.html +++ b/demos/tizen-winsets/widgets/tabbar/tabbar_title_text.html @@ -13,8 +13,8 @@
            -

            Controlbar text with title

            -
            +

            Tabbar text with title

            +
            • Menu
            • Save
            • diff --git a/src/themes/tizen/common/jquery.mobile.theme.less b/src/themes/tizen/common/jquery.mobile.theme.less index 83c1111..141de86 100755 --- a/src/themes/tizen/common/jquery.mobile.theme.less +++ b/src/themes/tizen/common/jquery.mobile.theme.less @@ -195,7 +195,7 @@ >[data-role="button"] { font-size : 15 * @unit_base; font-weight : bold; - color : @color_controlbar_btn_normal; + color : @color_tabbar_btn_normal; } [data-role="controlgroup"] { diff --git a/src/themes/tizen/common/jquery.mobile.tizen.controlbar.less b/src/themes/tizen/common/jquery.mobile.tizen.tabbar.less similarity index 64% rename from src/themes/tizen/common/jquery.mobile.tizen.controlbar.less rename to src/themes/tizen/common/jquery.mobile.tizen.tabbar.less index a3d3797..8e8e36c 100755 --- a/src/themes/tizen/common/jquery.mobile.tizen.controlbar.less +++ b/src/themes/tizen/common/jquery.mobile.tizen.tabbar.less @@ -1,21 +1,21 @@ @import "config.less"; /*************************************************************************** - Controlbar + Tabbar ***************************************************************************/ -.ui-controlbar { +.ui-tabbar { background : @color_bg; z-index : 1000; - &.ui-portrait-controlbar { + &.ui-portrait-tabbar { height : 55 * @unit_base; } - &.ui-landscape-controlbar { + &.ui-landscape-tabbar { height : 55 * @unit_base; } a.ui-btn { background : @color_bg; - color : @color_controlbar_btn_normal; + color : @color_tabbar_btn_normal; .ui-icon { width: 32 * @unit_base; @@ -26,31 +26,31 @@ } } - &.ui-controlbar-persist { + &.ui-tabbar-persist { a.ui-btn { background: @color_bg; } a.ui-state-persist, a.ui-state-persist.ui-btn-active, a.ui-btn-show-style { - color : @color_controlbar_btn_pressed; + color : @color_tabbar_btn_pressed; } a.ui-btn-hover-s.ui-btn-down-s { &:not(.ui-state-persist) { - color : @color_controlbar_btn_pressed; - background: @color_controlbar_btn_tab_press; + color : @color_tabbar_btn_pressed; + background: @color_tabbar_btn_tab_press; } } } - &:not(.ui-controlbar-persist) { + &:not(.ui-tabbar-persist) { a.ui-btn { background: @color_bg; } a.ui-btn-active, .ui-btn-show-style { - color : @color_controlbar_btn_pressed; + color : @color_tabbar_btn_pressed; } a.ui-btn.ui-btn-hover-s.ui-btn-down-s { - color : @color_controlbar_btn_pressed; - background: @color_controlbar_btn_tab_press; + color : @color_tabbar_btn_pressed; + background: @color_tabbar_btn_tab_press; } } @@ -68,14 +68,14 @@ } } - &.ui-controlbar-noicons { + &.ui-tabbar-noicons { .ui-btn-inner { padding-top : 19 * @unit_base; padding-bottom : 18 * @unit_base; } } - &.ui-controlbar-notext { + &.ui-tabbar-notext { .ui-btn-inner { padding-top : 50 * @unit_base; padding-bottom : 5 * @unit_base; @@ -87,43 +87,43 @@ } } -/* title font size when title controlbar */ -.ui-header.ui-bar-s.ui-title-controlbar { +/* title font size when title tabbar */ +.ui-header.ui-bar-s.ui-title-tabbar { .ui-title { font-size : 22 * @unit_base; margin-top : 8 * @unit_base; margin-bottom : 0 * @unit_base; } - .ui-controlbar { - &.ui-controlbar-noicons { + .ui-tabbar { + &.ui-tabbar-noicons { .ui-btn-inner { padding-top : 15 * @unit_base; padding-bottom : 13 * @unit_base; } } - &.ui-controlbar-notext { + &.ui-tabbar-notext { .ui-btn-inner { padding-top : 47 * @unit_base; padding-bottom : 0 * @unit_base; } } - &.ui-portrait-controlbar { + &.ui-portrait-tabbar { height : 47 * @unit_base; } - &.ui-landscape-controlbar { + &.ui-landscape-tabbar { height : 40 * @unit_base; } } } .ui-header.ui-bar-s { - &.ui-title-controlbar-multiline { + &.ui-title-tabbar-multiline { height : 75 * @unit_base; - .ui-controlbar { + .ui-tabbar { height : 75 * @unit_base; .ui-btn-inner { padding-top : 45 * @unit_base; @@ -135,7 +135,7 @@ .ui-footer.ui-bar-s { - .ui-controlbar { + .ui-tabbar { height : 49 * @unit_base; margin-left : auto; @@ -148,26 +148,16 @@ } } - .ui-controlbar.ui-controlbar-margin-back { + .ui-tabbar.ui-tabbar-margin-back { margin-right : 56 * @unit_base; } - .ui-controlbar.ui-controlbar-margin-more { + .ui-tabbar.ui-tabbar-margin-more { margin-left : 56 * @unit_base; } } -.ui-controlbar-s.ui-navbar-noicons { +.ui-tabbar-s.ui-navbar-noicons { font-size : 22 * @unit_base; -} - -.ui-btn-up-s { - .ui-icon-ctrl-edit { background-image: url(images/controlbar/00_ctrl_edit.png); } - -} - -.ui-btn-down-s, .ui-btn-hover-s, .ui-btn-active { - .ui-icon-ctrl-edit { background-image: url(images/controlbar/00_ctrl_edit_press.png); } -} - +} \ No newline at end of file diff --git a/src/themes/tizen/tizen-white/Makefile b/src/themes/tizen/tizen-white/Makefile index 45ef910..63ff30b 100755 --- a/src/themes/tizen/tizen-white/Makefile +++ b/src/themes/tizen/tizen-white/Makefile @@ -46,7 +46,7 @@ CSS_SRCS= ../common/jquery.mobile.theme.less.css \ ../common/jquery.mobile.popup.css \ ../common/jquery.mobile.tizen.popup.less.css \ ../common/jquery.mobile.tizen.misc.less.css \ - ../common/jquery.mobile.tizen.controlbar.less.css + ../common/jquery.mobile.tizen.tabbar.less.css all: prepare css images js diff --git a/src/themes/tizen/tizen-white/style.less b/src/themes/tizen/tizen-white/style.less index f52c1c9..d0c4870 100755 --- a/src/themes/tizen/tizen-white/style.less +++ b/src/themes/tizen/tizen-white/style.less @@ -18,11 +18,11 @@ /*************************************************************************** - Controlbar + Tabbar ***************************************************************************/ -@color_controlbar_btn_tab_press : -webkit-linear-gradient(top, rgba(169,165,151,1) 0%,rgba(246,248,239,1) 100%); /* B0514P1 : 00_tab_press_ef.9.png */ -@color_controlbar_btn_pressed : rgba(59, 115, 182, 1); /* B052L6P : Tab pressed */ -@color_controlbar_btn_normal : rgba(153, 153, 153, 1); /* B052L6 : Tab Normal */ +@color_tabbar_btn_tab_press : -webkit-linear-gradient(top, rgba(169,165,151,1) 0%,rgba(246,248,239,1) 100%); /* B0514P1 : 00_tab_press_ef.9.png */ +@color_tabbar_btn_pressed : rgba(59, 115, 182, 1); /* B052L6P : Tab pressed */ +@color_tabbar_btn_normal : rgba(153, 153, 153, 1); /* B052L6 : Tab Normal */ /*************************************************************************** List diff --git a/src/widgets/controlbar/js/jquery.mobile.tizen.controlbar.js b/src/widgets/tabbar/js/jquery.mobile.tizen.tabbar.js similarity index 51% rename from src/widgets/controlbar/js/jquery.mobile.tizen.controlbar.js rename to src/widgets/tabbar/js/jquery.mobile.tizen.tabbar.js index ee065d3..29357c2 100755 --- a/src/widgets/controlbar/js/jquery.mobile.tizen.controlbar.js +++ b/src/widgets/tabbar/js/jquery.mobile.tizen.tabbar.js @@ -20,7 +20,7 @@ * DEALINGS IN THE SOFTWARE. * *************************************************************************** * - * jQuery Mobile Framework : "controlbar" plugin + * jQuery Mobile Framework : "tabbar" plugin * Copyright (c) jQuery Project * Dual licensed under the MIT or GPL Version 2 licenses. * http://jquery.org/license @@ -28,19 +28,19 @@ */ /** - * Controlbar can be created using data-role = "controlbar" inside footer - * Framework determine which controlbar will display with controlbar attribute + * Tabbar can be created using data-role = "tabbar" inside footer + * Framework determine which tabbar will display with tabbar attribute * * Examples: * - * HTML markup for creating controlbar: ( 2 ~ 5 li item available ) - * icon can be changed data-icon attribute + * HTML markup for creating tabbar: ( 2 ~ 5 li item available ) + * icon can be changed data-icon attribute (customized icon need) *
              - *
              + *
              * *
              *
              @@ -48,20 +48,20 @@ (function ( $, undefined ) { - $.widget( "tizen.controlbar", $.mobile.widget, { + $.widget( "tizen.tabbar", $.mobile.widget, { options: { iconpos: "top", grid: null, - initSelector: ":jqmData(role='controlbar')" + initSelector: ":jqmData(role='tabbar')" }, _create: function () { - var $controlbar = this.element, - $ctrlbtns = $controlbar.find( "a" ), - iconpos = $ctrlbtns.filter( ":jqmData(icon)" ).length ? + var $tabbar = this.element, + $tabbtns = $tabbar.find( "a" ), + iconpos = $tabbtns.filter( ":jqmData(icon)" ).length ? this.options.iconpos : undefined, - textpos = $ctrlbtns.html().length ? true : false, + textpos = $tabbtns.html().length ? true : false, theme = $.mobile.listview.prototype.options.theme, /* Get current theme */ ww = window.innerWidth || $( window ).width(), wh = window.innerHeight || $( window ).height(), @@ -70,103 +70,103 @@ isLandscape = ww > wh && ( ww - wh ); if ( isLandscape ) { - $controlbar.removeClass( "ui-portrait-controlbar" ).addClass( "ui-landscape-controlbar" ); + $tabbar.removeClass( "ui-portrait-tabbar" ).addClass( "ui-landscape-tabbar" ); } else { - $controlbar.removeClass( "ui-landscape-controlbar" ).addClass( "ui-portrait-controlbar" ); + $tabbar.removeClass( "ui-landscape-tabbar" ).addClass( "ui-portrait-tabbar" ); } /* - $controlbar + $tabbar .addClass( "ui-navbar" ) .attr( "role", "navigation" ) .find( "ul" ) .grid( { grid: this.options.grid } ); */ - $controlbar.addClass( "ui-navbar" ) + $tabbar.addClass( "ui-navbar" ) .find( "ul" ) .grid( { grid: this.options.grid } ); - if ( $controlbar.parents( ".ui-footer" ).length ) { - $controlbar.find( "li" ).addClass( "ui-ctrl-btn-style" ); + if ( $tabbar.parents( ".ui-footer" ).length ) { + $tabbar.find( "li" ).addClass( "ui-tab-btn-style" ); } - /* title controlbar */ - if ( $controlbar.siblings( ".ui-title" ).length ) { - $controlbar.parents( ".ui-header" ).addClass( "ui-title-controlbar" ); + /* title tabbar */ + if ( $tabbar.siblings( ".ui-title" ).length ) { + $tabbar.parents( ".ui-header" ).addClass( "ui-title-tabbar" ); } if ( !iconpos ) { - $controlbar.addClass( "ui-controlbar-noicons" ); + $tabbar.addClass( "ui-tabbar-noicons" ); } if ( !textpos ) { - $controlbar.addClass( "ui-controlbar-notext" ); + $tabbar.addClass( "ui-tabbar-notext" ); } if ( textpos && iconpos ) { - $controlbar.parents( ".ui-header" ).addClass( "ui-title-controlbar-multiline" ); + $tabbar.parents( ".ui-header" ).addClass( "ui-title-tabbar-multiline" ); } - $ctrlbtns.buttonMarkup({ + $tabbtns.buttonMarkup({ corners: false, shadow: false, iconpos: iconpos }); - if ( $controlbar.find( ".ui-state-persist" ).length ) { - $controlbar.addClass( "ui-controlbar-persist" ); + if ( $tabbar.find( ".ui-state-persist" ).length ) { + $tabbar.addClass( "ui-tabbar-persist" ); } - $controlbar.delegate( "a", "vclick", function ( event ) { - $ctrlbtns.not( ".ui-state-persist" ).removeClass( $.mobile.activeBtnClass ); + $tabbar.delegate( "a", "vclick", function ( event ) { + $tabbtns.not( ".ui-state-persist" ).removeClass( $.mobile.activeBtnClass ); $( this ).addClass( $.mobile.activeBtnClass ); }); - $controlbar.addClass( "ui-controlbar"); + $tabbar.addClass( "ui-tabbar"); $( document ).bind( "pagebeforeshow", function ( event, ui ) { var footer_filter = $( event.target ).find( ":jqmData(role='footer')" ), - controlbar_filter = footer_filter.find( ":jqmData(role='controlbar')" ), - $elFooterMore = controlbar_filter.siblings( ":jqmData(icon='naviframe-more')" ), - $elFooterBack = controlbar_filter.siblings( ".ui-btn-back" ); + tabbar_filter = footer_filter.find( ":jqmData(role='tabbar')" ), + $elFooterMore = tabbar_filter.siblings( ":jqmData(icon='naviframe-more')" ), + $elFooterBack = tabbar_filter.siblings( ".ui-btn-back" ); footer_filter .css( "position", "fixed" ) .css( "bottom", 0 ) - .css( "height", controlbar_filter.height() ); + .css( "height", tabbar_filter.height() ); if ( $elFooterMore.length ) - controlbar_filter.addClass( "ui-controlbar-margin-more" ); + tabbar_filter.addClass( "ui-tabbar-margin-more" ); if ( $elFooterBack.length ) - controlbar_filter.addClass( "ui-controlbar-margin-back" ); + tabbar_filter.addClass( "ui-tabbar-margin-back" ); }); $( document ).bind( "pageshow", function ( e, ui ) { - var controlbar_filter = $( ".ui-page-active" ).find( ":jqmData(role='footer')" ).eq( 0 ).find( ":jqmData(role='controlbar')" ), + var tabbar_filter = $( ".ui-page-active" ).find( ":jqmData(role='footer')" ).eq( 0 ).find( ":jqmData(role='tabbar')" ), element_width = 0, - element_count = controlbar_filter.find( 'li' ).length; + element_count = tabbar_filter.find( 'li' ).length; - if ( controlbar_filter.length ) { - element_width = controlbar_filter.find("li:first").width(); - controlbar_filter.find("li:last").width( controlbar_filter.width() - element_width * ( element_count - 1 ) ); + if ( tabbar_filter.length ) { + element_width = tabbar_filter.find("li:first").width(); + tabbar_filter.find("li:last").width( tabbar_filter.width() - element_width * ( element_count - 1 ) ); } }); $( window ).bind( "resize", function ( e ) { - var controlbar_filter = $( ".ui-page-active" ).find( ":jqmData(role='footer')" ).eq( 0 ).find( ":jqmData(role='controlbar')" ), + var tabbar_filter = $( ".ui-page-active" ).find( ":jqmData(role='footer')" ).eq( 0 ).find( ":jqmData(role='tabbar')" ), element_width = 0, - element_count = controlbar_filter.find( 'li' ).length; + element_count = tabbar_filter.find( 'li' ).length; - if ( controlbar_filter.length ) { - element_width = controlbar_filter.find("li:first").width(); - controlbar_filter.find("li:last").width( controlbar_filter.width() - element_width * ( element_count - 1 ) ); + if ( tabbar_filter.length ) { + element_width = tabbar_filter.find("li:first").width(); + tabbar_filter.find("li:last").width( tabbar_filter.width() - element_width * ( element_count - 1 ) ); } }); - this._bindControlbarEvents(); + this._bindTabbarEvents(); }, - _bindControlbarEvents: function () { - var $controlbar = this.element; + _bindTabbarEvents: function () { + var $tabbar = this.element; $( window ).bind( "orientationchange", function ( e, ui ) { var ww = window.innerWidth || $( window ).width(), @@ -174,9 +174,9 @@ isLandscape = ww > wh && ( ww - wh ); if ( isLandscape ) { - $controlbar.removeClass( "ui-portrait-controlbar" ).addClass( "ui-landscape-controlbar" ); + $tabbar.removeClass( "ui-portrait-tabbar" ).addClass( "ui-landscape-tabbar" ); } else { - $controlbar.removeClass( "ui-landscape-controlbar" ).addClass( "ui-portrait-controlbar" ); + $tabbar.removeClass( "ui-landscape-tabbar" ).addClass( "ui-portrait-tabbar" ); } }); }, @@ -199,6 +199,6 @@ //auto self-init widgets $( document ).bind( "pagecreate create", function ( e ) { - $( $.tizen.controlbar.prototype.options.initSelector, e.target ).controlbar(); + $( $.tizen.tabbar.prototype.options.initSelector, e.target ).tabbar(); }); }( jQuery ) ); diff --git a/tests/unit-tests/controlbar/controlbar-tests.js b/tests/unit-tests/controlbar/controlbar-tests.js deleted file mode 100755 index cfe4da1..0000000 --- a/tests/unit-tests/controlbar/controlbar-tests.js +++ /dev/null @@ -1,53 +0,0 @@ -/* - * controlbar unit tests - */ - -(function ($) { - $.mobile.defaultTransition = "none"; - - module( "Controlbar" ); - - var unit_controlbar = function ( widget, drayStyle ) { - var controlbar, - controlbar_style, - item_count, - activeIndex, - deactiveReturn, - activeReturn, - created_controlbar = widget.controlbar(); - - /* Create */ - ok( created_controlbar, "Create" ); - - if ( drayStyle ) { - if ( drayStyle == "icon" ) { - equal( created_controlbar.find( "a" ).is(".ui-btn-icon_only" ), true, "Icon only style test"); - } else if ( drayStyle == "text" ) { - equal( created_controlbar.is(".ui-controlbar-noicons" ), true, "Text only style test"); - } - } - - /* Check APIs */ - activeIndex = created_controlbar.find(".ui-btn-active").index(); - created_controlbar.controlbar( "disable", activeIndex ); - deactiveReturn = created_controlbar.find("li:eq(" + activeIndex + ")").is(".ui-disabled"); - - equal( deactiveReturn, true, "List Deactive test" ); - - created_controlbar.controlbar("enable", activeIndex); - activeReturn = created_controlbar.find("li:eq(" + activeIndex + ")").is(".ui-disabled"); - equal( activeReturn, false, "List Active test" ); - }; - - test( "controlbar normal style test", function () { - unit_controlbar( $("#controlbar-test") ); - }); - - test( "controlbar icon style test", function () { - unit_controlbar( $("#controlbar-test-icon-only"), "icon" ); - }); - - test( "controlbar text style test", function () { - unit_controlbar( $("#controlbar-test-text-only"), "text" ); - }); -})(jQuery); diff --git a/tests/unit-tests/controlbar/index.html b/tests/unit-tests/controlbar/index.html deleted file mode 100755 index b653e2c..0000000 --- a/tests/unit-tests/controlbar/index.html +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - -

              jQuery Mobile Controlbar Tests

              -

              -

              -
                -
              - - -
              -
              -

              Controlbar Test - markup

              -
              -
              -
              -
              -
              - -
              -
              -
              - -
              -
              -

              Controlbar Test - markup

              -
              -
              -
              -
              -
              -
                -
              • -
              • -
              • -
              • -
              • -
              -
              -
              -
              - -
              -
              -

              Controlbar Test - markup

              -
              -
              -
              -
              -
              - -
              -
              -
              - - diff --git a/tests/unit-tests/segmentcontrol/segmentcontrol-tests.js b/tests/unit-tests/segmentcontrol/segmentcontrol-tests.js index dfc70ee..7a8ef4d 100755 --- a/tests/unit-tests/segmentcontrol/segmentcontrol-tests.js +++ b/tests/unit-tests/segmentcontrol/segmentcontrol-tests.js @@ -1,5 +1,5 @@ /* - * controlbar unit tests + * segmentcontrol unit tests */ (function ($) { diff --git a/tests/unit-tests/tabbar/index.html b/tests/unit-tests/tabbar/index.html new file mode 100755 index 0000000..f70e8e2 --- /dev/null +++ b/tests/unit-tests/tabbar/index.html @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + +

              jQuery Mobile Controlbar Tests

              +

              +

              +
                +
              +
              + +
              +
              +

              Controlbar Test - markup

              +
              +
              +
              +
              +
              + +
              +
              +
              + + diff --git a/tests/unit-tests/tabbar/tabbar-tests.js b/tests/unit-tests/tabbar/tabbar-tests.js new file mode 100755 index 0000000..790b9c7 --- /dev/null +++ b/tests/unit-tests/tabbar/tabbar-tests.js @@ -0,0 +1,45 @@ +/* + * tabbar unit tests + */ + +(function ($) { + $.mobile.defaultTransition = "none"; + + module( "Tabbar" ); + + var unit_tabbar = function ( widget, drayStyle ) { + var tabbar, + tabbar_style, + item_count, + activeIndex, + deactiveReturn, + activeReturn, + created_tabbar = widget.tabbar(); + + /* Create */ + ok( created_tabbar, "Create" ); + + if ( drayStyle ) { + if ( drayStyle == "icon" ) { + equal( created_tabbar.find( "a" ).is(".ui-btn-icon_only" ), true, "Icon only style test"); + } else if ( drayStyle == "text" ) { + equal( created_tabbar.is(".ui-tabbar-noicons" ), true, "Text only style test"); + } + } + + /* Check APIs */ + activeIndex = created_tabbar.find(".ui-btn-active").index(); + created_tabbar.tabbar( "disable", activeIndex ); + deactiveReturn = created_tabbar.find("li:eq(" + activeIndex + ")").is(".ui-disabled"); + + equal( deactiveReturn, true, "List Deactive test" ); + + created_tabbar.tabbar("enable", activeIndex); + activeReturn = created_tabbar.find("li:eq(" + activeIndex + ")").is(".ui-disabled"); + equal( activeReturn, false, "List Active test" ); + }; + + test( "tabbar text style test", function () { + unit_tabbar( $("#tabbar-test-text-only"), "text" ); + }); +})(jQuery); diff --git a/tests/unit-tests/tests.js b/tests/unit-tests/tests.js old mode 100644 new mode 100755 index d1efa12..932a94b --- a/tests/unit-tests/tests.js +++ b/tests/unit-tests/tests.js @@ -4,7 +4,7 @@ var TESTS = { "autodividers", "button", "check", - "controlbar", + "tabbar", "datetimepicker", "extendablelist", "handler", -- 2.7.4