Fixed open/close first Tab issue

Add noTabLeft flag and use tabModel.set() when open first tab; Move
constants to Tab.* script