Restructure dragbar code

optimize bar's html structure ,reduced some redundant code.